int wb_create_control (int parent, int ctlclass [, mixed caption [, int xpos [, int ypos [, int width [, int height [, int id [, int style [, int param [, int ntab]]]]]]]]])
Creates a window control, menu, toolbar, status bar or accelerator.
This function may set the text and/or the tooltip (small hint window) of the control when it is created. To create a tooltip, text must be an array with two elements. The first one is the new caption (or NULL if one is not required) and the second one is the new tooltip (or NULL if one is not required). Most classes support tooltips. See the table in wb_set_text() to check which classes do support them.
Returns the handle of the newly created control or NULL or
zero if an error occurs.
parent is a handle to the WinBinder object that is the parent window.
ctlclass
is the class of the control or object to be created. Click here for a list of the available control
classes.
caption is either a string with the caption of the control, an
array of captions, or an array of arrays with caption and/or tooltip information, depending on the
control class.
xpos,
ypos, width and height describe the position and dimensions
of the control when required.
id is an integer that identifies the
control. It must be unique if the control is to be processed by a callback
function.
style contains the style
flags.
param is an optional integer value that depends on the
control class. See wb_set_value() for
supported values.
ntab is the index of the tab
page that the control is to be inserted on, if any.
This function returns an integer that is a handle to the WinBinder object created, or NULL if the function fails.
See the table in the wb_set_text() page.
|
// Create some controls $toolbar = wb_create_control($mainwin, ToolBar,
array( |
wb_create_window
wb_set_text
wb_set_value
Control classes
Control functions
TabControl
class