Personal tools
From wiki.swiftlytilting.com
Jump to: navigation, search

WinBinder Manual/wb set text

Sets the text of a WinBinder object. Sets the text of an object

Contents

Syntax

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

The action taken depends on the type of wbobject.

Class Type Action
<winterpostwiki>CheckBox</winterpostwiki>StringSets the text of the control.
<winterpostwiki>ComboBox</winterpostwiki>ArrayCreates items, one per array element.
<winterpostwiki>EditBox</winterpostwiki>StringSets the text of the control.
<winterpostwiki>Frame</winterpostwiki>StringSets the text of the control.
<winterpostwiki>HyperLink</winterpostwiki>StringSets the text of the control.
<winterpostwiki>Label</winterpostwiki>StringSets the text of the control.
<winterpostwiki>ListBox</winterpostwiki>ArrayCreates items, one per array element.
<winterpostwiki>ListView</winterpostwiki>ArrayCreates column titles, one per array element, or changes cell contents.
<winterpostwiki>Menu</winterpostwiki>StringSets the text of the menu item specified by the item identifier.
<winterpostwiki>PushButton</winterpostwiki>StringSets the text of the control.
<winterpostwiki>RadioButton</winterpostwiki>StringSets the text of the control.
<winterpostwiki>RTFEditBox</winterpostwiki>StringSets the text of the control.
<winterpostwiki>StatusBar</winterpostwiki>StringSets the text of the status bar.
<winterpostwiki>TabControl</winterpostwiki>ArrayCreates or renames tab pages.
<winterpostwiki>TreeView</winterpostwiki>ArrayCreates or renames treeview nodes.
For all classes of windows and dialog boxes, wb_set_text() sets the window title.

Returns

Returns TRUE on success or FALSE if an error occurs

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

Winbinder Projects