GetTopIndex Method (COMBOBOX / DATALIST)


PLBCMP GUI Only

 

The GetTopIndex method retrieves the index of the first visible item in a DATALIST or COMBOBOX object. The method uses the following format:

 

[label]

{object}.GetTopIndex

[GIVING {return}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A DATALIST or COMBOBOX object that is accessed.

return

Optional. A Numeric Variable that returns the zero-based index of the first visible item.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. Upon completion, {return} is a zero-based number indicating the first visible item in the list. Initially, item zero is at the top of the list box. But, if the list box is scrolled, another item may be at the top.

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

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

  4. The EOS Condition Flag is always cleared.

  5. This method is not supported when using the PL/B Web Server.

 

 

See Also: Method Syntax, DATALIST Methods, COMBOBOX Methods

 



PL/B Language Reference GetTextLen Method (DATALIST) InsertString Method (COMBOBOX / DATALIST)