GetCaretIndex Method (DATALIST)


PLBCMP GUI Only

 

The GetCaretIndex method retrieves the index of the item that has the focus in a DATALIST object. The method uses the following format:

 

[label]

{object}.GetCaretIndex

[GIVING {return}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A DATALIST object that is accessed.

return

Optional. A Numeric Variable that returns the zero-based index of the item that has the caret.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. If the MULTISELECT is false, {return} is the zero-based index of the item that is selected if any. Otherwise, {return} indicates the zero-based index of the item that has the focus rectangle. The item may or may not be selected.

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

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

  4. The EOS Condition Flag is always cleared.

  5. When using the PL/B Web Server, this method is not supported.

 

 

See Also: Method Syntax, DATALIST Methods

 



PL/B Language Reference FindStringExact Method (COMBOBOX / DATALIST) GetCount Method (COMBOBOX / DATALIST)