Data Access Worldwide Knowledge Base
Article ID 2154 Article Title HOWTO: Specify a MINIMUM size for the visual container Article URL http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=2154 KBase Category VDF (GENERAL) Date Created 08/01/2005 Last Edit Date 08/05/2005
Article Text
QUESTION:
I have an SRC file that has only one view. I do NOT want this application to be full-screen when activated.
The View size is defined as 250 422, which is fine.
However, at present it is possible - by dragging the bottom right-hand corner of the visual container - to resize the whole application until I only have the DAW VDF Icon + 2 chars of the Container Label and the Minimize/Maximize/Exit Icons showing at the top of my screen.
What I want to be able to do is specify a MINIMUM size for the visual container, so that it never clips the View it displays. How do I do this?
As I understand it, anchors only apply within a View etc, not within a container object. I have also had a look at using piMaxSize and piMinSize within the .SRC file, but am getting weird results - they only get applied (successfully) when I try to resize the initial invalid size of the Container object.
Can anyone assist, please ?
ANSWER:
You can set the piMinSize and/or piMaxSize of your Panel (that is the object Main) using the Object Properties panel -- remember that the size is also stored in the registry.
Normally, if you start a program, resize it and restart it, it will remember the last size.
You can set the pbPreserveEnvironment of your oApplication object to false to prevent that and delete the registry key \HKCU\Software\<CompanyName>\<ProgramName> to start from scratch.
[Knut Sparhell] Keep in mind that a view size may become less than the piMinSize if the Size property tells it to. If the actual size is less than the piMinSize, then you may resize it, but only to a size equal or larger than the piMinSize. In other words, piMinSize is not the minimum size. It is the minimum size you can *resize* to.
Contributed By:
Pieter van Dieren
Company: Synerga
email: pieter.v.dieren@synerga.nl
Web Site: http://www.synerga.nl
Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.
The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.