Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

string

Scroll pagebreak

Examples

Code Block
languagetext
// Get the string of an item in the Drop List User Control 

...

int $windowId;

...


int $controlId;

...


int $i, $numItems;

...


string $itemStr;

...


 

...

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

...


 

...

// Get the number of items.

...


$numItems = `getNumDropListItems $controlId`;

...


 

...

// Iterate through the list of items.

...


for( $i = 0; 

...

  $i < $numItems; 

...

  $i += 1 )

...


     { 

...

        $itemStr = `getDropListItem $controlId $i`; 

...


        print $itemStr;

...


}

Additional information

Related commands

...