wb_set_text

bool wb_set_text (int wbobject, mixed text [, int item [, int subitem]])

Sets the text of a WinBinder object. wb_set_text can also rename or create items in certain controls. The actual action depends on the object class. Returns TRUE on success or FALSE if an error occurs.

Control class information

See the following table.

Class

Type

Action

CheckBox

String

Sets the text of the control.

ComboBox

Array

Creates items, one per array element.

EditBox

String

Sets the text of the control.

Frame

String

Sets the text of the control.

HyperLink

String

Sets the text of the control.

Label

String

Sets the text of the control.

ListBox

Array

Creates items, one per array element.

ListView

Array

Creates column titles, one per array element, or changes cell contents.

Menu

String

Sets the text of the menu item specified by the item identifier.

PushButton

String

Sets the text of the control.

RadioButton

String

Sets the text of the control.

RTFEditBox

String

Sets the text of the control.

StatusBar

String

Sets the text of the status bar.

TabControl

Array

Creates or renames tab pages.

TreeView

Array

Creates or renames treeview nodes.

Window class information

For all classes of windows and dialog boxes, wb_set_text() sets the window title.

Example

wb_set_text($PushButton, "OK")                    // Sets the text of a button
wb_set_text($ComboBox, "Item 1\nItem 2\nItem 3")  // Creates items on a combo box
wb_set_text($TabControl, "Tab 1\nTab 2\nTab 3")   // Creates tabs on a tab control

See also

wb_get_text
Control functions
Window functions