WEBGUI

wgControl

Common properties and events of WebGUI controls

Syntax

Signature
oControl:SetFocus() --> oControl
oControl:Destroy() --> oControl
oControl:onClick := {| oControl | ... }
oControl:onChange := {| oControl | ... }

Return value

SetFocus() and Destroy() return the control.

Description

wgControl is the base class for WebGUI controls. Create a concrete control with its New() method. Most constructors take a window, a row, a column or a panel as oParent.

PropertyMeaning
parentRead-only parent object.
idRead-only numeric identifier within the window.
textCaption of a label, button or check box, label of an edit, GET or combo box, or title of a menu.
valueCurrent value. The supported type depends on the control.
enabledLogical state of an interactive control. Initially .T..
visibleLogical visibility. Initially .T..
x, yLeft and top offsets in logical pixels. A nonnegative offset places the control outside the normal layout. Set both to NIL to restore automatic placement.
width, heightPositive size in logical pixels, or NIL to use automatic sizing.
grow.T. shares the remaining height in a column or width in a row. Several growing controls share that space.

SetFocus() requests focus for a control that accepts it. Destroy() removes the control from the page. The events supported by a control are listed on its reference page. onChange receives the control after its value is updated. Assigning :value from xDev updates the display without calling onChange. Sidebar placement and sizing follow the rules in wgSidebar.

See also