ui.Combobox.GetItemText()

ui.Combobox.GetItemText() retrieves the text of the specified combo box option.

Syntax

CALL <cmb_var>.GetItemText(<index>)

Arguments

index

index of the combo box option (INTEGER)

Usage and examples

Takes one argument - the index of the combo box option:

CALL cmb.GetItemText(3)

Index is not the identifier or the text of the combo box option - it is the number of the option in the order options appear in the combo box.

You can pass a variable as an argument for ui.Combobox.GetItemText() (see example program, ui.ComboBox.GetItemText):

LET input_var=fgl_winprompt(5,3,"Enter the option's index (Example: 3).","",25,0)

IF input_var IS NOT NULL THEN

  DISPLAY "The option's text is ",cmb.GetItemText(input_var),"."

END IF

 

If you enter the wrong index, ui.Combobox.GetItemText() will return you an empty value:

If you do not pass any arguments to ui.Combobox.GetItemText(), you will get a runtime error - 9107. Wrong number of input parameters.

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.