GetItemState Method (LISTVIEW)
PLBCMP GUI Only
The GetItemState method retrieves the state for a specified item in a LISTVIEW object. An item's state information includes a set of bit flags found in the low order byte of the return value that indicates specific states. In addition, the return value can include image list index information in the high order byte that indicates the item's state image and overlay image. The only valid bits in the return value are those that correspond to the bits set in the statemask parameter. 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 item's state as described below.
index
Required. A zero-based decimal number or Numeric Variable that specifies the item or row accessed.
statemask
Required. A decimal number or Numeric Variable that specifies the valid state values as described below.
Flags Affected: EOS, OVER, ZERO
Note the following:
Upon completion, {return} will contain the state of the item. The constant names are defined in PLBMETH.INC.
|
Value |
Constant |
The item ... |
|
0x1 |
LVIS_FOCUSED |
has focus. |
|
0x2 |
LVIS_SELECTED |
is selected. |
|
0x4 |
LVIS_CUT |
has been cut. |
|
0x8 |
LVIS_DROPHILITED |
is being dragged. |
|
0xF00 |
LVIS_OVERLAYMASK |
has its overlay image index retrieved. |
|
0xF000 |
LVIS_STATEIMAGEMASK |
has its state image index retrieved. |
When using the PL/B Web Server, only the LVIS_FOCUSED and LVIS_SELECTED state values are supported. Any other state values are meaningless.
The required statemask specifies the state information to retrieve. This parameter can be a combination of the above values.
The EOS, OVER and ZERO Condition Flags are always cleared.
See Also: Method Syntax, LISTVIEW Methods, SETITEMSTATE Method
![]() |