CheckState indicates whether a check box is checked
Member of CheckBox (PRIM_MD.CheckBox)
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) Theme(#SYS_THEME) Height(592) Width(881) Define_Com Class(#PRIM_MD.CheckBox) Name(#CheckBox) Caption('Checked') DisplayPosition(1) Height(41) IconHeight(0) Left(24) Parent(#COM_OWNER) TabPosition(1) ThemeDrawStyle('Heading1') Top(24) Width(241) Enabled(False) Define_Com Class(#PRIM_MD.CheckBox) Name(#CheckBox1) Caption('Check Box 1') DisplayPosition(2) IconColor(Theme500) Left(24) Parent(#COM_OWNER) TabPosition(2) Top(80) Width(145) Height(33) Define_Com Class(#PRIM_MD.CheckBox) Name(#CheckBox2) Caption('Check Box 2') DisplayPosition(3) IconColor(ThemeAccentMedium) Left(24) Parent(#COM_OWNER) TabPosition(3) Top(136) Width(129) Evtroutine Handling(#CheckBox1.Changed #CheckBox2.Changed) If (#CheckBox1.CheckState = #CheckBox2.CheckState) #CheckBox.CheckState := #CheckBox1.CheckState Else #CheckBox.CheckState := Grayed Endif Endroutine End_Com
LANSA Version 15, April 2020