Versions Compared

Key

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

...

Scroll tablelayout
sortDirectionASC
repeatTableHeadersdefaultstyle
widths10%, 15%, 14%, 13%, 48%
style
sortByColumn1
sortEnabledfalse
cellHighlightingtrue

...

Return value

integer

Examples

Code Block
languagetext
// Search for a string in a List Box User Control.

...


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 = `createListBox $windowId`;

...


 

...

// Add some items to the List Box.

...


addListBoxItem $controlId "This is text";

...


addListBoxItem $controlId "This";

...


addListBoxItem $controlId "is text";

...


 

...

// First search for the word "this". It will return

...


// 0, since "this" is a prefix of the first item. 

...


$index = `findListBoxItem $controlId "this"`;

...


print $index;

...


 

...

// Now search for "this" again, this time specifying

...


// the -exact flag. It will return 1 

...


$index = `findListBoxItem $controlId "this" -exact`;

...


print $index;

Scroll pagebreak

Additional information

...