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:

 

[label]

{object}.GetItemState

[GIVING {return}] USING [*Index=]{index}:

 

 

[*Statemask=]{statemask}

 

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:

  1. Upon completion, {return} will contain the state of the item. The constant names are defined in PLBMETH.INC.

  2.  

    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.

     

  3. When using the PL/B Web Server, only the LVIS_FOCUSED and LVIS_SELECTED state values are supported. Any other state values are meaningless.

  4. The required statemask specifies the state information to retrieve. This parameter can be a combination of the above values.

  5. The EOS, OVER and ZERO Condition Flags are always cleared.

 

 

See Also: Method Syntax, LISTVIEW Methods, SETITEMSTATE Method

 



PL/B Language Reference GetItemRect Method (LISTVIEW) GetItemText Method (LISTVIEW)