visible

Type: Boolean

Availability: Read or write at any time

The visible property of the Window class specifies whether an object is visible or hidden. When the visible property is set to true (the default), the object is visible. Set this property to false to hide the object.

To hide a control at startup, set the visible property to false in the JADE development environment. Setting this property in logic enables you to hide and later redisplay a control at run time in response to a specific event.

The visible property, when set in the JADE development environment, has no effect for a form. The show or showModal method causes the form to become visible. Setting the visible property to true causes the load event for the form to be executed if it has not already been executed.

As sibling controls that have the alignContainer property set do not occupy the same area on their parent, use the visible property to control the window that is currently displayed in this situation.

When a window is invisible, it does not receive any mouse, keyboard, focus, activation, or drag and drop events. The window still receives notification events and forms still receive load, queryUnload, and unload events.

When the visible property for a Button, CheckBox, OptionButton, Picture, Label, TextBox, Web label, or Web picture control defined for a Web page is set to false, the input type for the control is hidden. For other controls that are supported on Web pages, the control is not included in the HTML generation when this property is set to false.

The code fragment in the following example shows the use of the visible property.

// show hourglass etc when loading data (unless during initial form load)
if self.visible then               // visible unless loading
    app.mousePointer    := MousePointer_HourGlass;
    statusLine1.caption := 'Reading...';
endif;

The visible property cannot be changed for a form created with the createPrintForm method of the GUIClass class.