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 a tab controller 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


setTabHandler userControlID [-selChange string]


userControlIdintyesID of the control to be queried.


NameFlag argumentsArgument typeExclusive toComments
selChange1stringThe script that the command will be referencing.

Return value



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

// Create a Tab controller and forms to associate with the tabs.
int $mainTab;
int $mainForm;
int $secondForm;
int $thirdForm;

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

//create a main tab controller with a second and third tab
$mainTab = `createTab $windowId "Main" "Second" "Third" -sel 2`;

// Set the -selChange event handler for the setTabHandler. When
// the user switches tabs, this script will be
// executed. setTabHandler must reside in one of
// the scripts directories.
setTabHandler $mainTab -selChange " SetTabHandler";

Additional information

Related commands