ButtonState indicates whether a check box is checked |
Member of Check Box (PRIM_CKBX)
Data Type - Enumeration
ButtonState determines the appearance of the CheckBox
Enum Value | Description |
|---|---|
Checked | Box will be checked to show a positive state |
Grayed | Box will show an indeterminate state |
Unchecked | Box will be unchecked to show a negative state |
This example shows 3 checkboxes. The top two can be checked/unchecked. The bottom checkbox shows a combined state.
Begin_Com Role(*EXTENDS #PRIM_WEB) Height(440) Width(688)
Define_Com Class(#PRIM_CKBX) Name(#CheckBox1) Caption('On or Off') DisplayPosition(1) Left(271) MarginLeft(2) Parent(#COM_OWNER) TabPosition(1) Top(52) Height(43) Width(146)
Define_Com Class(#PRIM_CKBX) Name(#CheckBox2) Caption('On or Off') DisplayPosition(2) Left(271) MarginLeft(2) Parent(#COM_OWNER) TabPosition(2) Top(95) Height(43) Width(146) Ellipses(End)
Define_Com Class(#PRIM_CKBX) Name(#CheckBox3) Caption('Both On or Off?') DisplayPosition(3) Left(271) MarginLeft(2) Parent(#COM_OWNER) TabPosition(3) Top(138) Height(43) Width(146) ReadOnly(True)
Evtroutine Handling(#CheckBox1.Click #CheckBox2.Click)
If (#CheckBox1.ButtonState = #CheckBox2.ButtonState)
#CheckBox3.ButtonState := #CheckBox2.ButtonState
Else
#CheckBox3.ButtonState := Grayed
Endif
Endroutine
End_Com