FindItem Method (LISTVIEW)
PLBCMP GUI Only
The FindItem method locates an item within a LISTVIEW object. The method uses the following format:
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A LISTVIEW object that is searched.
return
Optional. A Numeric Variable that returns the zero-based index of the item found.
start
Optional. A decimal number or Numeric Variable that specifies the zero-based item or row number after which to begin the search.
text
Optional. A Character String Variable or literal indicating the string to locate.
param
Optional. A decimal number or Numeric Variable that specifies the user-defined value to locate.
flags
Optional. A decimal number or Numeric Variable that alters the search method as described below.
Flags Affected: EOS, OVER, ZERO
Note the following:
The search is done using only the first column and must match the beginning of the string or the string exactly. The search is case insensitive.
To search from the beginning of the LISTVIEW, use a {start} value of negative one or omit the parameter.
If {start} is not specified, the search begins at the first item or row.
If *Param={param} is given, the search on *Text={text} is ignored.
{flags} is a constant as defined in PLBMETH.INC or a numeric variable indicating one of the following actions:
|
Value |
Constant |
Specifies that the string must ... |
|
0x0 |
(none) |
match exactly. (default) |
|
0x8 |
LVFI_PARTIAL |
only start with the specified text. |
Upon completion, {return} will contain the zero-based number of the item or row found or -1 if the search fails.
If the value returned is zero, the ZERO Condition Flag is set.
If {return} is too small to contain the result of the method, the OVER Condition Flag is set.
The EOS Condition Flag is always cleared.
See Also: Method Syntax, LISTVIEW Methods
![]() |