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

Vicon Shogun banner


Sets the event handler for the time box user control that is specified by userControlID.

Event handlers are simply scripts to be called when certain events happen. User controls get notified about changes in state when users interact with them. Each event handler flag takes as an argument a script (which must reside in your script directories).

To clear an event handler, pass the empty string, "", to the flag. If no options are specified, all handlers are reset, and the user control will not respond to any events.

Functional area

User Window

Command syntax


setTimeBoxHandler userControlID [-change string] [-loseFocus string]


userControlIdintyesID of user control to set event handler for.


NameFlag argumentsArgument typeExclusive toComments
change1stringSpecifies the script to call when the user changes the value of the time box.
loseFocus1stringSpecifies the script to call when the text box loses the input focus.

Return value



// Set the event handler for the User Time Box.
int $windowId;
int $controlId;

// First create a User Window to place the Control on
$windowId = `createWindow "MyWindow"`;

// Create the User Control on the Window.
$controlId = `createTimeBox $windowId`;

// Save the control ID to our profile, so we can retrieve it
// from the event handler
writeProfileInt "MyWindowSection" "TimeBoxId" $controlId;
// Set the -loseFocus event handler for the Time Box. When
// the user clicks (or Tabs) out of Time Box item, this script will be
// executed. TimeBoxLoseFocusHandler must reside in one of
// the scripts directories.
setTimeBoxHandler $controlId -loseFocus "TimeBoxLoseFocusHandler";

Additional information

Related commands