ui.Combobox.GetTextOf() returns the text of the specified combo box option.
CALL <cmb_var>.GetTextOf(<value>)
Arguments
value |
value of the combo box option (STRING, INTEGER, BOOLEAN, or other type) |
Usage and examples
Takes one argument - the value of the combo box option:
CALL cmb.GetItemText(value3)
This argument can be STRING, INTEGER, BOOLEAN, or of other type that is available for combo box options:
CALL cmb.GetItemText(3)
CALL cmb.GetItemText("value3")
You can pass a variable as an argument for ui.Combobox.GetTextOf() (see example program, ui.ComboBox.GetTextOf):
LET input_var=fgl_winprompt(5,3,"Enter the option's index (Example: 3).","",25,0)
IF input_var IS NOT NULL THEN
DISPLAY "Output for getTextOf(): ",cmb.GetTextOf(input_var),"."
END IF
If you enter the wrong value, ui.Combobox.GetTextOf() will return you an empty value (see example program, ui.ComboBox.GetTextOf):
If you do not pass any arguments to ui.Combobox.GetTextOf(), you will get a runtime error - 9107. Wrong number of input parameters.