Data Access Worldwide Knowledge Base

Article ID 2257
Article Title HOWTO: How can I change the size of the automatic validation table popup object
Article URL http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=2257
KBase Category VDF (GENERAL)
Date Created 11/07/2006
Last Edit Date 06/05/2007


Article Text
QUESTION:
If I have validations in a datadictionary they will appear in my view as an Options-Dialog. This dialog ist very small (only about 4 or 5 lines). With about 15 or 20 options the user has to scroll through or to change the height of this dialog.

So, how can I change the size of this automatic generated options-dialog?

ANSWER:
The option dialog mentioned is the standard validation table lookup object that is statically created by the inclusion of the source file dfddpklt.pkg (part of dfallent). The size is default set to 100 by 300 units. The object id is stored in a global integer named DD_Global_Validation_Prompt_Object. You can change the size of this object anywhere you like. As an example; The following code sets the size of the object in the cApplication object when the program is constructed. The height of the prompt list is set to 1/3 of the screensize (so lower resolution gives a less high prompt list object).

Object oApplication is a cApplication
    Set psCompany to "Data Access Worldwide"
    Set psProduct to "Visual DataFlex Examples"
    Set psVersion to "12.0"
    Set psProgram to "Order"
    Set psHelpFile to "Examples.chm"
    Set peHelpType to htHtmlHelp
    
    Procedure OnCreate
        Integer iSize iScreenSize iNewHeight iWidth
        
        Forward Send OnCreate
        
        // 1 means size of screen without taskbar size.
        Move (GUIScreen_Size (1)) to iScreenSize
        
        // Check if the object (still) exists before using the handle
        If (Object_Id (DD_Global_Validation_Prompt_Object) > 0) Begin
            Get GuiSize of DD_Global_Validation_Prompt_Object to iSize
            Move (Low (iSize)) to iWidth
            Move (Hi (iScreenSize) / 3) to iNewHeight
            Set GuiSize of DD_Global_Validation_Prompt_Object to iNewHeight iWidth
        End
    End_Procedure
End_Object    // oApplication


Contributed By:
Vincent Oorsprong
Company: Data Access Worldwide
email: vincent.oorsprong@dataaccess.eu
Web Site: http://www.dataaccess.eu


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.