value

Type: Integer (scroll bars), Boolean (check box, button, JADE mask, and option button)

Availability: Read or write at any time

The value property determines the state of a CheckBox control as checked or unchecked. The default value is zero (0), or false.

For Button and JadeMask controls, the value property specifies whether the state of the button or mask control is up (false) or down (true). Setting the value property is ignored for a normal push button or mask control with a style property of Style_Normal (0). For a two-state or an automatic two-state button or mask control, setting this property pushes or raises the button or mask control. For an automatic two-state button or mask control, setting the value property to true also causes other automatic two-state buttons or mask controls with the same parent to come up. For automatic two-state buttons or mask controls, setting the value property to false has no impact on other buttons or mask controls in the same group.

For OptionButton controls, setting the value property to true causes other option buttons in the same group to be set to false. Setting the value property to false has no impact on other option buttons in the same group.

For horizontal and vertical ScrollBar controls, the value property determines the current position of the scroll bar. The value that is returned is always between the values for the max and min properties.

The settings for the value property are listed in the following table.

Control Description
CheckBox false is unchecked (default), true is checked
Button and JadeMask false indicates the button is up, true indicates the button is down
ScrollBar Set values between the min and max properties, to position the scroll box
OptionButton true indicates the button is selected, false (the default) indicates the button is not selected

The following example shows the use of the value property.

tranState_click(checkbox: CheckBox input) updating;
begin
    if tranState.value then
        if not process.isInTransactionState then
            beginTransaction;
            sl1.caption := $S_In_Transaction_State;
        endif;
    else
        if process.isInTransactionState then
            commitTransaction;
            sl1.caption := $S_Not_In_Transaction_State;
        endif;
    endif;
end;