ui.Combobox.GetItemName()

ui.Combobox.GetItemName() retrieves the value of the specified combo box option.

Syntax

CALL <cmb_var>.GetItemName(<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.GetItemName(5)

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.GetItemName() (see example program, ui.ComboBox.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 ", cmb.GetItemName(input_var), "."

END IF

 

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

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

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.