wb_get_value

mixed wb_get_value (int wbobject [, int item [, int subitem]])

Retrieves the value of a control or control item. The item and subitem parameters are set to -1 if absent.

What it retrieves for each class

See the following table.

Class

What it retrieves

Type

Calendar

The selected date of the control as a Unix timestamp.

integer

CheckBox

The checked state of the control (TRUE or FALSE).

bool

ComboBox

The integer value associated with the given item, or with the selected item if item is -1 or empty. ¹

integer

EditBox

The integer value of the control text.

integer

ImageButton

The integer value of the control caption.

integer

Label

The integer value of the control caption.

integer

ListBox

The integer value associated with the given item, or with the selected item if item is -1 or empty. ¹

integer

ListView

An array of integers with the indices of the checked items. ²

integer array

Menu

The checked state of the menu item specified in item (TRUE or FALSE).

bool

PushButton

The integer value of the control caption.

integer

RadioButton

The selected state of the control (TRUE or FALSE).

bool

RTFEditBox

The integer value of the control text.

integer

ScrollBar

The current position of the control.

integer

Slider

The current position of the control.

integer

Spinner

The current position of the control.

integer

TreeView

The value of the node specified by item, or by the selected node if item is -1 or empty. ¹

mixed

Window

0 (zero).

 

Other controls

0 (zero).

 

¹ This value must have been previously set with wb_create_items() or wb_set_value().
² Compare with
wb_get_selected().

See also

wb_get_selected
wb_get_text
wb_set_value
Control functions