Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Current »

Description

Gets the zero-based index of the selected item in the drop list user control that is specified by userControlID.

If no item is selected, -1 is returned.

Functional area

User Window

Command syntax

Syntax

getDropListSelItem userControlID

Arguments

NameTypeRequiredComments
userControlIdintyesID of user control to operate on.

Flags

None

Return value

integer

Examples

// Get the selected Drop List User Control item
int $windowId;
int $controlId;
int $index;

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

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

// Add some items to the Drop List.
addDropListItem $controlId "Item 1";
addDropListItem $controlId "Item 2";
addDropListItem $controlId "Item 3";

// Select the second item
selectDropListItem $controlId 1;

// Get the selected item
$index = `getDropListSelItem $controlId`;
print $index;

Additional information

Related commands

  • No labels