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:

 

[label]

{object}.GetNextItem

[GIVING {return}] USING [*Flags=]{flags}[:

 

 

[*Start=]{start}]

 

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:

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

  2.  

    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.

 

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

  2. {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.

  3. Upon completion, {return} will contain the next item number within the LISTVIEW. If the method fails, a negative one is returned.

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

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

  6. The EOS Condition Flag is always cleared.

 

 

See Also: Example Code, Method Syntax, LISTVIEW Methods

 



PL/B Language Reference GetLastDropXY Method (LISTVIEW) GetStringWidth Method (LISTVIEW)