...
Scroll tablelayout | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
None
Return value
void
Examples
Code Block | ||
---|---|---|
| ||
// Position the control in the middle of the User Window |
...
int $windowId; |
...
int $controlId; |
...
int $rect[4], $controlRect[4]; |
...
...
// First create a User Window to place the Control on |
...
$windowId = `createWindow "MyWindow"`; |
...
...
// Create a Text Box Control in the window. |
...
$controlId = `createTextBox $windowId -text "I am centered"`; |
...
...
// Get the rect of the User Window, so we can center the |
...
// Text Box in it$rect = `getWindowRect $windowId`; |
...
...
// Now center it in the window |
...
$controlRect[0] = $rect[0]; |
...
$controlRect[1] = ($rect[1] + $rect[3]) / 2; |
...
$controlRect[2] = $rect[2]; |
...
$controlRect[3] = $controlRect[1] + 24; |
...
setControlPos $controlId $controlRect; |
Additional information
Related commands
...