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