Click or drag to resize

Control.Value Property

X#
The value held in the control, in whatever data type the control holds.

Namespace:  VO
Assembly:  VOGUIClasses (in VOGUIClasses.dll) Version: 2.21
Syntax
 VIRTUAL PROPERTY Value AS USUAL GET SET 
Request Example View Source

Property Value

Type: Usual
The value held in the control, in whatever data type the control holds.
Remarks
The value held in the control, in whatever data type the control holds. Control:Value is thus of the usual data type. For example, in a regular edit control, the value can be the string "Jones" or the number 14683. In a check box, Control:Value can be TRUE or FALSE. In a list box or combo box, the Control:Value is generally one of the return values (unless the control is bound to a field where the actual contents is not one of the allowable choices). In a radio button group, Control:Value holds the group value (specified in the Window Editor) of the radio button that is currently selected; if none is selected, Control:Value is set to NIL. The data type of the control's Value is determined by its field specification; in turn, controls linked to a data server inherit the field specification—and hence data type—from the field of the server. When the control is made data-aware, by setting its name to the name of a field in the server attached to the data window, Control:Value is able to automatically read from and write to this field.
Tip Tip
Value may not always be consistent with the state of the control, as indicated to the end-user. For example, if the data value for the field is not one of the allowed choices for a list box or combo box return value, or among the group value settings for the radio buttons in a radio button group, the control will be in a "no-match" situation. In this case the control will revert to its initial unselected state.
Examples
The following examples demonstrate the use of the Control:Value property:
X#
1// Prints "N" for numeric
2?ValType(oDCAmountControl:Value)
3// Access the control (numeric value)
4nAmount := oDCAmountControl:Value
5// Assign 5 to the control
6oDCAmountControl:Value := 5
See Also