GetButtonState method: Utils class

Syntax

GetButtonState(&ButtonField)

Description

Use the GetButtonState method to return the state of a toggle button as a Boolean value.

Parameters

Parameter Description

&ButtonField

Specifies the toggle button as a Field object.

Returns

A Boolean value: True if the button state is "pressed" (or on), otherwise False.

Example

Local Field &oToggleButton = GetField();
Local PT_PAGE_UTILS &oUtils = create PT_PAGE_UTILS:Utils();
If (&oUtils.GetButtonState(&oToggleButton) Then 
   /* Processing for the on state */
Else
   /* Processing for the off state */
End-If;
Local boolean &bState = &oUtils.ToggleButtonState(&oToggleButton);