WinBinder Manual/wb set value

From wiki.swiftlytilting.com

Sets the value(s) and/or the minimum and maximum range of a control

Syntax

bool wb_set_value (int control, mixed value [, int item])
  • The action taken depends on the class of control.
Class Action taken Type of value
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().

Returns

Returns TRUE on success or FALSE if an error occurs.

See also