Making a window or window control invisible


Make a window or window control invisible


hide object_id [, object_id]…

Makes the object or objects listed invisible.

The object is removed from display, but its appearance and properties remain unchanged. The show command is used to restore the object to the display.

The object’s visibility when next created is not affected. The style flag WS_INVISIBLE is used to change an object’s initial visibility.

A hidden control may receive input by means of the input and dialog commands. In the case of buttons, this technique may be used to detect if the user has clicked on a particular area of the screen.

Different object types may be freely mixed in a hide command. The valid objects are:


Hiding a window removes the window, and all the controls contained within it, from the screen display. This does not, however, logically hide each control within the window. If the window is redisplayed, those controls which were previously visible remain visible and those which were invisible remain invisible, unless they have in the meantime been explicitly shown or hidden themselves.

A hidden window, and the controls within it, may be updated by the display and clearing of data or the hiding and showing of controls. The changes are visible when the window is next displayed.

If the window is a child of a tab control window, the hide command has no effect unless that tab is currently selected, in which case the tab is hidden (leaving all tabs of the window hidden)


A textbox group or button group. This is equivalent to hiding each button or textbox within the group individually.

box_id, button_id, graphic_id, listbox_id, table_id, text_id

A single object. If the object is a textbox, no subscript may be specified. All rows are hidden.

The hide command is not relevant to menus, which are activated and deactivated by means of the open and close commands. To hide a menu item, assign the style flag WS_INVISIBLE .


  • Objects are redisplayed by means of the show command.

  • If the object is already visible the hide command is ignored.

  • Windows and window objects are created visible unless assigned the style flag WS_INVISIBLE.


menuitem MenuConfig {
     label = "&Configure"
     select = Configure

!function Configure() {
     DisplayWin(WinConfig, wintask)
     SavedConfig = tmpConfig
     dialog WinConfig cancel = CONFIG_RETURN

     hide WinConfig