Contents | Index | < Browse | Browse >
xONLOAD etc
These are very important events, which take place :
xOnLOAD -> upon loading of the GUI
xOnOPEN -> upon opening of the GUI's window
xOnCLOSE -> upon Closing of the GUI's window (with GuiClose or Close gadget)
xOnQUIT -> upon Quitting of the GUI
xONRELOAD -> When you call GuiLoad, if the file you want loaded is
already loaded, then nothing will happen.
You can declare this event if you want something to happen.
For a simple gui you may have something like the following :
xOnLoad
MyVar = something ; set any variables you need to set first..
SetGad MyGui.gc 1 OFF ; set any gadgets on/off/show/hide etc
GuiOpen MyGui.gc ; to open the gui window upon loading
xOnClose
GuiQuit MyGui.gc ; to quit (unload) the gui upon the closing of
; it's window.
The above is only an example. You may have many commands, actions etc
upon the happening of any of the above events.
These events (apart from xOnReload) can also take ARGUMENTS
These arguments can be defined in the event's command line:
> xONLOAD arg1 arg2... arg6
This is specially usefull in xOnLoad, as it allows you to make small
guis and use them as "functions". Examples of such fuctions can be
found in the GUIs:tools/rtn directory.