ui.ListBox.GetItemText()

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)

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

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.

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.