FindItem Method (LISTVIEW)


PLBCMP GUI Only

 

The FindItem method locates an item within a LISTVIEW object. The method uses the following format:

 

[label]

{object}.FindItem

[GIVING {return}] USING [[*Start=]{start}][:

 

 

[*Text=]{text}][,[*Param=]{param}][:

 

 

[*Flags=]{flags}]

 

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:

  1. 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.

  2. To search from the beginning of the LISTVIEW, use a {start} value of negative one or omit the parameter.

  3. If {start} is not specified, the search begins at the first item or row.

  4. If *Param={param} is given, the search on *Text={text} is ignored.

  5. {flags} is a constant as defined in PLBMETH.INC or a numeric variable indicating one of the following actions:

  6.  

    Value

    Constant

    Specifies that the string must ...

    0x0

    (none)

    match exactly. (default)

    0x8

    LVFI_PARTIAL

    only start with the specified text.

 

  1. Upon completion, {return} will contain the zero-based number of the item or row found or -1 if the search fails.

  2. If the value returned is zero, the ZERO Condition Flag is set.

  3. If {return} is too small to contain the result of the method, the OVER Condition Flag is set.

  4. The EOS Condition Flag is always cleared.

 

 

See Also: Method Syntax, LISTVIEW Methods

 



PL/B Language Reference EnsureVisible Method (LISTVIEW) FindItemCheck Method (LISTVIEW)