Vicon Shogun banner

Description

Sets the event handler for the drop list 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

Syntax

setDropListHandler userControlID [-selChange string]

Arguments

NameTypeRequiredComments
userControlIdintyesID of user control to set event handler for.

Flags

NameFlag argumentsArgument typeExclusive toComments
selChange1stringSpecifies the script to call when the user changes the selection of the drop list.

Return value

void

Examples

// Set the event handler for the User Drop List.
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 = `createDropList $windowId "one" "two"`;

// Save the control ID to our profile, so we can retrieve it
// from the event handler
writeProfileInt "MyWindowSection" "DropListId" $controlId;

// Set the -selChange event handler for the Drop List. When
// the user changes the selection of the Drop List, this script will be
// executed. DropListChangeHandler must reside in one of
// the scripts directories.
setDropListHandler $controlId -selChange "DropListChangeHandler";

Additional information

Related commands