This information is for Vicon Shogun 1.7. For up-to-date help, see the latest Shogun documentation.

Vicon Shogun banner


Creates a time box user control on the user window specified by windowID. A time box is a text box which specifically deals with frame numbers, respecting the time appearance in Shogun.

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


createTimeBox parentWindowID[-hidden] [-pos integer array] [-form integer] [-frame integer]


windowIdintyesID of user window to place the control on.


NameFlag argumentsArgument typeExclusive toComments
hidden0Specifies that the control should be hidden initially. Call showControl to subsequently make it visible. The default is for it to be visible.
frame1integerSpecifies that the frame number to display.
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 time box 20 units high by 50 units wide.
form1integerControl ID of the form user control which will dynamically position this control.

Return value



// Create a time box user control.
int $windowId;
int $controlId;
int $rect[4];
int $playEnd;

// 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

// Get the end of the play range
$playEnd = `getPlayEnd`;

// Create the Control on the Window, passing
// in the Window Id of the user window we
// just created. Set the frame number to be
// the end of the play range.
$controlId = `createTimeBox $windowId-pos $rect -frame $playEnd`;

Additional information

Related commands