GetNextItem Method (LISTVIEW)
PLBCMP GUI Only
The GetNextItem method retrieves the next item number in a LISTVIEW object based on the specified action code. The method uses the following format:
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A LISTVIEW object that is accessed.
return
Optional. A Numeric Variable that returns the zero-based index of the next item.
flags
Required. A decimal number or Numeric Variable that indicates an action from the table below.
start
Optional. A decimal number or Numeric Variable that indicates the starting item number.
Flags Affected: EOS, OVER, ZERO
Note the following:
{flags} is a variable, literal or constant as defined in PLBMETH.INC indicating one of the following actions:
|
Value |
Constant |
Returns the ... |
|
0x0 |
LVNI_ALL |
subsequent item based on the index. |
|
0x1 |
LVNI_FOCUSED |
next focused item. |
|
0x2 |
LVNI_SELECTED |
next selected item. |
|
0x4 |
LVNI_CUT |
next marked item. |
|
0x8 |
LVNI_DROPHILITED |
next drop highlighted item. |
|
0x100 |
LVNI_ABOVE |
item above the specified item. |
|
0x200 |
LVNI_BELOW |
item below the specified item. |
|
0x400 |
LVNI_TOLEFT |
item to the left of the specified item. |
|
0x800 |
LVNI_TORIGHT |
item to the right of the specified item. |
When using the PL/B Web Server, only the LVIS_FOCUSED and LVIS_SELECTED state values are supported. Any other state values are ignored and disregarded.
{start} is an optional zero-based number indicating the item number from which the search will start. To start with item number zero (0), define {start} as a FORM field with a value of -1. The item specified by {start} is itself excluded from the search.
Upon completion, {return} will contain the next item number within the LISTVIEW. If the method fails, a negative one is returned.
If the value returned is zero, the ZERO Condition Flag is set.
If {return} is too small to contain result of the method, the OVER Condition Flag is set.
The EOS Condition Flag is always cleared.
See Also: Example Code, Method Syntax, LISTVIEW Methods
![]() |