GetText Method (COMBOBOX / DATALIST)


PLBCMP GUI Only

 

The GetText method retrieves the text for a specified item in a DATALIST or COMBOBOX object. The method uses the following format:

 

[label]

{object}.GetText

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

 

Where:

label

Optional. A Program Execution Label.

object

Required. A DATALIST or COMBOBOX object that is accessed.

return

Optional. A Character String Variable that returns the item's text.

index

See below. A Numeric Variable that specifies the zero-based item within the object.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. {index} is required for a DATALIST.

  2. If the {index} parameter is not specified for a COMBOBOX, the GetText method returns the text string of the currently selected item. If the COMBOBOX is cleared and does not have a selection, the returned variable is a Null String.

  3. Upon completion, {return} will contain the specified item's text within the object.

  4. If {return} is too small to contain the text string, the EOS Condition Flag is set.

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

 

 

See Also: Method Syntax, DATALIST Methods, COMBOBOX Methods

 



PL/B Language Reference GetSelCount Method (DATALIST) GetTextLen Method (DATALIST)