FindData Method (COMBOBOX)


PLBCMP GUI Only, 10.1B

 

The FindData method finds a specific COMBOBOX item by comparing the user-defined values associated the combobox items. The method uses the following format:

 

[label]

{object}.FindData

[GIVING {return}] USING [*DATA=]{data}

 

Where:

label

Optional. A Program Execution Label.

object

Required. A DATALIST or COMBOBOX object that is searched.

return

Optional. A Numeric Variable that returns a value for the COMBOBOX item.

data

Required. A Numeric Variable or decimal number that is compared against the COMBOBOX user-defined values associated with the COMBOBOX items.

index

Required. A decimal number or Numeric Variable that is compared against the COMBOBOX user-defined values associated with the COMBOBOX items.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. The ZERO flag is set if the returned value is zero.

  2. The OVER flag is set if the {return} variable is too small to receive the numeric value.

  3. The EOS flag is always set to FALSE.

  4. The {return} value is a zero-relative number that is the COMBOBOX item number that has a user-defined value which is the same as the {data} value. If this method does not find a matching item, the {return} value is -1.

 

 

See Also: Method Syntax, DATALIST Methods, COMBOBOX Methods

 



PL/B Language Reference Dir Method (COMBOBOX / DATALIST) FindString Method (COMBOBOX / DATALIST)