WbObjects/createControl

From wiki.swiftlytilting.com

createControl is used to create a window control. This control will be a child of the window.

Syntax:

createControl($class, $name=null, $caption=null, $xpos=null, $ypos=null, $width=0, $height=0,  $style=null, $param1=null, $ntab = null)

Contents

Parameters

class WinBinder control class type
The first parameter may also be an array of arrays with the parameters of multiple controls to be created. (see example for a better understanding of this feature.
name wbObjects name for this control
caption Depends on control class; either a string with the caption of the control, an array of captions, or an array of arrays with information.
xpos Horizontal position of the control in pixels relative to the parent window
ypos Vertical position of the control in pixels relative to the parent window
width Width of the control in pixels
height Width of the control in pixels
style wbControl style
param1 Optional integer value that depends on the control class
ntab The index of the tab page that the control is to be inserted on, if any.

Return Value

createControl returns a reference to the newly created wbControl object.


Objects with this method

Example

$window = createWindow(AppWindow, 'theWindow', 'Test Window', 200, 300, 300, 400);
$window->createControl(PushButton, 'the button', 'Push me!', 10, 10, 100, 30);


Template:WbObjectsMethods

wbObjects Manual

Objects | Methods | Properties | Events