ui.ListBox.GetItemText() retrieves the text of the specified list box option.
Syntax
CALL <lbx_var>.GetItemText(<index>)
Arguments
index |
index of the list box option (INTEGER) |
Usage and examples
Takes one argument - the index of the list box option:
CALL lbx.GetItemText(3)
You can pass a variable as an argument for ui.ListBox.GetItemText() (see example program, ui.ListBox.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 ",lbx.GetItemText(input_var),"."
END IF
If you enter the wrong index, ui.ListBox.GetItemText() will return you an empty value:
If you do not pass any arguments to ui.ListBox.GetItemText(), you will get a runtime error - 9107. Wrong number of input parameters.