/
createTimeBox

createTimeBox

Description

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

Syntax

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

Arguments

NameTypeRequiredComments
windowIdintyesID of user window to place the control on.

Flags

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

integer

Examples

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

Related content


© Copyright Vicon Motion Systems. All rights reserved.

Vicon trademarks