Applies to

All controls.

Description

Returns or sets visibility status of specified control. If true, the control is visible at run-time. If false, the control is invisible at run-time

Usage

visiblestate = Get_Property (objectname"VISIBLE")

existingstate = Set_Property (objectname"VISIBLE"visiblestate)

Remarks

The visiblestate value passed to Set_Property() can be any of the valid show-window states, (those states accepted by the Windows API function ShowWindow). For example, the Windows SDK file "windows.h" defines SW_RESTORE as 9; this value restores a minimized window to its previous size, equivalent to the "Restore" choice on the Window's system menu.

Note: To hide a menu item, set its visible property to 0. A top level menu (on the menu bar) cannot be hidden this way. To hide it, set its TEXT property to null.

Returns

Values returned by Get_Property and Set_Property:

ValueDescription
visiblestate0=Hidden.
 1=Visible.
 2=Minimized.
 3=Maximized.
existingstateVisibility status, when Set_Property() was run.

See also

REDRAW propertySIZE propertyCREATE Event

Example (Making Menu Items Invisible)

/* on a window, under the TOOLS menu bar item are menu items called TOOLS1, TOOLS2, TOOLS3, and TOOLS4.  
To hide these menu items, set the VISIBLE property to 0. Do this in the CREATE event.*/
 
declare subroutine Set_Property
for i = 1 to 4
  Set_Property(@window: ".MENU.TOOLS.TOOL": i, "VISIBLE", 0)
next i
  • No labels

1 Comment

  1. Setting the VISIBLE property to -1 is the same as a Hard Disable.