ui.ComboBox methods

 

ui.ComboBox methods are used to manipulate ui.ComboBox objects at runtime.

 

To manipulate ui.ComboBox objects, you have to:

 

declare the ui.ComboBox object with a DEFINE statement:

 

DEFINE cbx_object ui.ComboBox

 

initialize the ui.ComboBox object:

 

LET cbx_object = ui.ComboBox.forName("my_combobox")

 

 

ui.ComboBox.setDefaultInitializer()

specifies the default function which will be used for initialize combo boxes every time a new ui.ComboBox object is created

ui.ComboBox.forName()

initializes an object of the ComboBox class

ui.ComboBox.clear()

clears the dropdown list of the specified ui.ComboBox object

ui.ComboBox.addItem()

adds an item to the combo box dropdown list

ui.ComboBox.getTag()

retrieves the value of the TAG attribute set in the 4fm form file for the specified combo box widget

ui.ComboBox.getTableName()

retrieves the table prefix of the specified form field (returns NULL if no prefix is specified at the form field level)

ui.ComboBox.getColumnName()

retrieves the column prefix of the specified form field (returns NULL if no prefix is specified at the form field level)

ui.ComboBox.getItemName()

retrieves the value of the specified item of the combo box list

ui.ComboBox.getItemCount()

retrieve the total number of items present in the combo box dropdown list (returns zero if the list is empty)

ui.ComboBox.getItemText()

retrieves the text of the specified combo box list item

ui.ComboBox.getTextOf()

returns the text displayed to the specified combo box list item

ui.ComboBox.getIndexOf()

returns the position of the specified combo box list item

ui.ComboBox.removeItem()

deletes an item from the combo box list by name