_TPL_DialogExtended - Pattern for extended dialog froms (internal data type)
Usage
Extended dialogs are used in order to perform more complex user dialogs. Typically, extended dialogs are called when actions more difficult than just entering data into a form are required. Usually, the extended dialog window contains one or more action buttons, e.g. for adding components to a component list.
Structure
The form consists of edit control ( dialog ), which is supposed to contain the object instance data. The Finish/Cancel buttons are defined in the dialog_frame and might be removed or other buttons might be added.
Besides the form for entering data the dialog contains a description area in the upper part ( info ), which contains a short description how to use the dialog. In the lower part, there is a message area ( message ), which allows displaying messages when some action in the dialog went wrong.
Data source
By default, the data source from the parent control calling the window (action) is passed to the dialog. The data source might be assigned by the context, also, in which case the data source should be set in the doAfterOpen() handler. In order to set the data source in the context class, the data source for the dialog_frame or for dialog has to be set to user-defined.
Changing size
In order to change the size of the pattern controls, you have to decrease or increase the size for the all controls defined in the pattern class. The size for the Dialog window is calculated from the size of the dialog_frame control (when set to 0) or should be larger..
Design
The dialog control has to be filled with content after initializing a design class with the template. The long description of the dialog control contains the text to be displayed in the upper hint area. You may also add additional buttons on top of the window. When adding buttons in the dialog_frame control, you should remove spacers from the grid cells. In order to add more buttons, one may increase the horizontal grid size for the dialog_frame control.
The behavior of the extended dialog usually requires a context class. Basic functionality is implemented in the cStdDialogBase context class, which might be overloaded in the application class.