Versions Compared

Key

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

...

Return value

integer

Examples

Code Block
languagetext
// Add items to a List Box 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 = `createListBox $windowId`;

...


 

...

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

...


addListBoxItem $controlId "Item 1";

...


addListBoxItem $controlId "Item 2";

...


addListBoxItem $controlId "Item 3";

...


addListBoxItem $controlId "Inserted!" -insert 1;

...


 

...

// Set the current selection to the first item

...


selectListBoxItem $controlId 0;

Additional information

Related commands

...