Manuals >User's Guide >Creating Graphic User Interfaces Print version of this Book (PDF file) |
![]() ![]() |
||||||||
|
|||||||||
Controlling DialogsLaunching DialogsYou can launch dialogs defined in the GUI page via four iccap_func commands:
The above forms require that you provide a third argument, which is a unique name for that instance of the dialog. In this way you can raise three identical dialogs if it makes sense to do so.
These forms don't require a name, and thus you can only show the dialog once using this command. It's useful for callbacks—see the properties for the Wizard GUI Item's Cancel button in the gui_tutorial.mdl. Auto Execute FeatureIf you name a macro AutoExecute, it will run when the icon is double clicked on the main window. The normal Model window will not open. To open the normal Model window, select File > Edit... or right click on the icon and choose Edit... If an AutoExecute macro is not declared, double clicking the icon opens the Model window as usual. You can create an AutoExecute Dialog that creates a particular GUI. This alternate GUI could allow an extraction to be preformed without opening the model file. The following example shows a simple 2 line AutoExecute macro that first calls a transform in a particular setup, which resets the controlling flags of the GUI to a known state, then it displays a modeless dialog.
For additional examples, see gui_tutorial.mdl or gui_demo.mdl. Removing DialogsYou can remove dialogs in two ways—Close and Destroy:
Automating GUI ItemsAdding ItemsYou may add items to a GUI page via iccap_func on either the GUI Items page, or another GUI item. Two additional parameters are required to name the item and to declare the item's type. The type specification must be a code that uniquely declares the Item type. Select the Show Codes button on the Properties dialog of a GUI Item to see the codes for all Item types.
Setting OptionsYou may change options on any Item on a GUI Page from PEL by using the Set GUI Options action on a GUI Item. You may enter as many additional arguments as desired. The last argument must be "" (a null string) to signify completion. Each argument is of the form <code>=<val>. Code is the associated code for the option as found by pressing Show Codes on the properties dialog. The <val> can be one of four forms.
Setting CallbacksYou may set a callback on a GUI item by using the action Set GUI Callback. This action requires three other arguments. The first is the code for the callback. The second and third extra argument are the two parameters to the callbacks associated iccap_func(). |
|||||||||
|
|||||||||
![]() ![]() |