## wb_set_value

bool wb_set_value (int control, mixed value [, int item])

Sets one or more values of a control or control item. Returns `TRUE` on success or `FALSE` if an error occurs.

NOTE: Due to limitations in Windows, values are limited to 16-bit values only.

# What it does for each class

See the following table.

Class | What it does | Type
--- | --- | ---
Calendar | Sets the selected date of the control. The value must be a valid Unix timestamp. | integer
CheckBox | Sets the checked state of the control. | bool
ComboBox | Stores an integer into the specified item or into the selected item if item is empty or -1. | integer
EditBox | Sets the text to the integer specified. | integer
Gauge | The control integer value. ¹ | integer
ImageButton | Sets the checked state of the control. | bool
Label | Sets the text to the integer specified. | integer
ListBox | Stores an integer into the specified item or into the selected item if item is -1 or empty. | array
ListView | Sets the checked state of the row (or array of rows) specified by item. ² | array
Menu | Sets the checked state of the menu item specified. ² | bool
PushButton | Sets the checked state of the control. | bool
RadioButton | Sets the checked state of the control. | bool
RTFEditBox | Sets the text to the integer specified. | integer
ScrollBar | The control position. ¹ | integer
Slider | The control position. ¹ | integer
Spinner | The control integer value. ¹ | integer
TreeView | Stores an integer, string or float value into the specified node or into the selected node if item is empty or -1. | mixed

¹ The control range can be set using wb_set_range().
² Compare with wb_set_selected().

# See also

wb_get_value
wb_set_range
wb_set_selected
Control functions