Contents Previous Next Subchapters

Hiding A Window Or Disabling A Control
Syntax hide(caption)
See Also show , iconify

If caption is a character row vector, hides the window with the specified caption . If caption is "toolbar" and no such window exists, the O-Matrix toolbar is disabled (i.e., grayed out). If caption is "omatrix" then the entire O-Matrix application is hidden. That is no user interface or icon appears on the desktop.

Note that when running the O-Matrix VM (The re-distributable run-time engine provided with the O-Matrix Development Kit), the O-Matrix startup state is to be displayed. For many applications in which you have provided the desired end-user interface it is desirable to run O-Matrix hidden,

If handle is an integer column vector with two elements, the control specified by handle is disabled (i.e., grayed out), where handle is the value returned by the call to addcontrol that created the control. Controls with the bitmap style cannot be disabled.

Caption Example
If you enter
     hide("Graphic 0")
the default graphics window will disappear. You can use
     show("Graphic 0")
to make the window reappear.

Handle Example
The following program creates a dialog window with a push button labeled "Disable". When the button is pressed, it is disabled and cannot be activated again. The dialog can be deleted using the control on its caption bar.

Caption  = "Test Dialog"
geometry = [100, 100, 150, 100]
callback = "delwin(Caption);"
adddialog(Caption, geometry, callback);
geometry = [40, 20, 70, 20]
name     = "Disable"
callback = "hide(Handle);"
Handle   = addcontrol(Caption, geometry, "pushbutton", name, callback)