To meet your needs, we constantly work to improve Querix products.
This means that Lycia documentation is developing as well.
In case you have found a certain dissonance between the provided information and the actual behavior of Lycia 3 and/or your applications, please, let us know about this via documentation@querix.com so that we can introduce the necessary changes to our documentation.
Thank for your attention and cooperation.
The SetDefaultInitializer() method is used to specify the default function which will be used for combo box initialization each time the program creates a new ComboBox object. This class method needs the quoted name of the function or a variable containing the function name as an argument.
CALL ui.ComboBox.SetDefaultInitializer("init_function")
The initializing function should use the ComboBox object as the argument. The ComboBox object needs to be declared by a DEFINE statement within this function. Each time an object of ui.Combobox class is initialized in the program, the initialization function is called and the new ui.Combobox object is passed to it as a parameter. Thus it is possible to alter the combo box contents even before the corresponding form was opened.
SetDefaultInitializer() method needs the function name specified in lower-case.
Here is an example of the method application:
CALL ui.ComboBox.setDefaultInitializer("init_func")
....
FUNCTION init_func(cbx)
DEFINE cbx ui.ComboBox
CALL cbx.clear()
CALL cbx.addItem(1,"Village")
CALL cbx.addItem(2,"Town")
CALL cbx.addItem(3,"City")
END FUNCTION