DataFlex Studio: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 11: Line 11:


'''Tips and Tricks'''
'''Tips and Tricks'''
== Visual Modelling of multiple visual objects ==
The VDF studio is geared towards handling source code with one main panel or dialog, and accordingly when the programmer switches to a visual represntation the Studio will display the first such object in the source file.
However in some cases the programmer may find it useful to be able to include such items as password or other popup dialogs in the same source file as the main object.
To allow the main object to be modelled and hide the 'lesser' objects, it is necessary to change the class of the popup objects to be non-modellable.
I do it this way.
//Object Freddialog is a cmydbmodalpanelnomodel //uncomment to hide from modelling
Object Freddialog is a cmybmodalpanel          //comment this line to hide from modelling
...
End_object
and here's the class, the only important line being the { DesignerClass=None }  at the top
''
//***************************************************************************
//*
//* Class:        cMyDbModalPanelnomodel
//* Package Name: cMyDbModalPanelnomodel.pkg
//* Use for password popups etc. This stops a popup being modelled in the Studio
//  as otherwise the main panel isn't getting seen. Mostly used in Menus
//*
//***************************************************************************
Use dfdbmdpn.pkg
{ DesignerClass=None } //Daves mod to stop this sneaking in and being modelled when  the meaty stuff is MUCH lower
Class cMyDbModalPanelnoModel is a dbModalPanel
    Procedure Construct_object
        Forward Send Construct_Object
    End_Procedure
End_Class // cMyDbModalPanel
''
Anonymous user