Versions Compared

Key

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

...

integer

Scroll pagebreak

Examples

Code Block
languagetext
// Add items to a Drop List User Control.

...


int $windowId;

...


int $controlId;

...


// First create a User Window to place the Control on

...


$windowId = `createWindow "MyWindow"`;

...


 

...

// Create the User Control on the Window. Don't use the

...


// sort flag so we can demonstrate how to insert vs. append.

...


$controlId = `createDropList $windowId`;

...


 

...

// Add some items to the Drop List. Insert one as well

...


addDropListItem $controlId "Item 1";

...


addDropListItem $controlId "Item 2"; 

...

addDropListItem $controlId "Item 3";

...


addDropListItem $controlId "Inserted!" -insert 1;

...


 

...

// Set the current selection to the first item

...


selectDropListItem $controlId 0;

Additional info

Related commands

...