User Tools

Site Tools


value_set_radio_or_check_control_use_variable_assignment_.htm
Navigation:  Language Reference > 9 -  Window and Report Attributes > Window and Report Attributes >====== VALUE (set RADIO or CHECK control USE variable assignment) ====== Previous pageReturn to chapter overviewNext page

NewC7.jpg

VALUE ( string )
truevalue , falsevalue

blk2blue.jpg

VALUE Specifies the value assigned to the OPTION structure's USE variable when the RADIO control is selected by the user, or the values assigned to the CHECK control's USE variable when checked and un-checked by the user.
string A string constant containing the value to assign to the OPTION's USE variable.
truevalue A string constant containing the value to assign to the CHECK's USE variable when the user has checked the box (PROP:TrueValue, equivalent to {PROP:Value,1}).
falsevalue A string constant containing the value to assign to the CHECK's USE variable when the user has un-checked the box (PROP:FalseValue, equivalent to {PROP:Value,2}).

The VALUE attribute (PROP:VALUE) on a RADIO control specifies the value that is automatically assigned to the OPTION structure's USE variable when the RADIO control is selected by the user. This attribute overrides the RADIO control's text parameter.

The VALUE attribute on a CHECK control specifies the values that are automatically assigned to the control's USE variable when the user checks and un-checks the box. This attribute overrides the default assignment of zero and one.

All automatic type conversion rules apply to the values assigned to the control's USE variable. Therefore, if the string, truevalue, or falsevalue contains only numeric data and the USE variable is a numeric data type, it receives the numeric value.

PROP:VALUE may also be used on an ENTRY, SPIN, or COMBO control to interrogate the value that would be placed into the control's USE variable by UPDATE (or when the control loses focus) without actually updating the USE variable. This can cause EVENT:Rejected to generate, if appropriate.

Example:

Win WINDOW,AT(0,0,180,400)

    OPTION('Option 1'),USE(OptVar1),MSG('Pick One or Two')

     RADIO('Radio 1'),AT(120,0,20,20),USE(?R1),VALUE('10') !OptVar1 gets 10

     RADIO('Radio 2'),AT(140,0,20,20),USE(?R2),VALUE('20') !OptVar1 gets 20

    END

    OPTION('Option 2'),USE(OptVar2),MSG('Pick One or Two')

     RADIO('Radio 1'),AT(120,0,20,20),USE(?R1),VALUE('10') !OptVar2 gets '10'

     RADIO('Radio 2'),AT(140,0,20,20),USE(?R2),VALUE('20') !OptVar2 gets '20'

    END

    CHECK('Check 1'),AT(160,0),USE(Check1),VALUE('T','F')

   END

value_set_radio_or_check_control_use_variable_assignment_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1