Vicon Shogun banner

Description

Creates a static box user control on the user window that is specified by windowID.

A static box is simply some text, used to label other controls, or provide feedback.

The control is initially placed in the top-left corner of the user window, and must be placed by using the -pos option, or by using the setControlPos command.

The command returns the Control ID of the user control, which should be saved for later operations on the control.

Functional area

User Window

Command syntax

Syntax

createStaticBox parentWindowID[-hidden] [-text string] [-pos integer array] [-form integer] [-right]

Arguments

NameTypeRequiredComments
windowIdintyesID of user window to place the control on.

Flags

NameFlag argumentsArgument typeExclusive toComments
right0Specifies that the text be right justified in the control. The default is left justified.
hidden0Specifies that the control should be hidden initially. Call showControl to subsequently make it visible. The default is for it to be visible.
text1stringThe text that gets displayed with the control. The default is no text.
pos1integer arrayA four-element int array representing a rectangle, which specifies the initial size/position of the control relative to the top left corner of the user window. The element order is Left, Top, Right, and Bottom. The default is a static box 20 units high by 50 units wide.
form1integerControl ID of the form user control which will dynamically position this control.

Return value

integer

Examples

// Create a static box User Control.
int $windowId;
int $controlId;
int $rect[4];
// First create a user window to place the control on
$windowId = `createWindow "MyWindow"`;
// Specify the size of the Control - 100 units wide
$rect[0] = 20; // Left
$rect[1] = 20; // Top
$rect[2] = 120; // Right
$rect[3] = 40; // Bottom

// Create the Control on the Window, passing
// in the Window Id of the User Window we
// just created.
$controlId = `createStaticBox
$windowId-text "This is some text!" -pos $rect`;