...
Scroll tablelayout | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Return value
integer
Examples
...
...
// Search for a string in a Drop List 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 = `createDropList $windowId`;
...
// Add some items to the Drop List.
...
addDropListItem $controlId "This is text";
...
addDropListItem $controlId "This";
...
addDropListItem $controlId "is text";
...
// First search for the word "this". It will return
...
// 0, since "this" is a prefix of the first item.
...
$index = `findDropListItem $controlId "this"`;
...
print $index;
...
// Now search for "this" again, this time specifying
...
// the -exact flag. It will return 1
...
$index = `findDropListItem $controlId "this" -exact`;
...
print $index;
Scroll pagebreak |
---|
Additional information
...