Top  >  Lycia reference  >  Querix 4GL  >  Classes and Methods  >  ui classes and methods  >  ui.Combobox methods  >  ui.Combobox.addItem()

ui.Combobox.AddItem()

The AddItem() method is used to add an item to the ComboBox dropdown list. The method needs two parameters:

 

CALL cbx.AddItem(value, "tag")

 

The value argument identifies the real value of the form field which will be recorded to the variable, if this combo box item is selected during the input. You should avoid trailing spaces in this argument. The values are truncated during the estimation, and the value which is got as the result will not match the ComboBox item name.

 

The tag argument specifies the value that will be actually displayed to the dropdown list. If this argument is NULL, the first argument will be used as a display value. If you use trailing spaces in this argument, the width of the ComboBox object can appear greater than you expect it to be. The VARCHAR or STRING data types as well as CLIPPED operator used with CHAR variables can help you to avoid this problem.