index    previous    next
 
combobox

COMBOBOX

The COMBOBOX control allows an item to be selected from a list. Unlike the LISTBOX control, the COMBOBOX control also allows the user to enter a value not available in the list.

The COMBOBOX control has a log function associated with it. When a value is entered by the user or selected from the available list of items, the log function is invoked with the value entered or selected.

The programmer refers to the log function as the "log_func". To invoke a specific log function when the COMBOBOX is manipulated by the user, the programmer sets the "log_func_name" in the "combobox control" dialog to the name of the function to be invoked. The "log_func" can be either an internal XPE interface function (e.g. WINCTL::dismiss_control), an external user written XPE function or an external user written C++ function located in a dynamic link library.

The COMBOBOX control can take an explicit list of items or can access an abitary list via three specially available access methods (specific to each instance of a COMBOBOX control). The explict list property is called "option_list" and is specified as an XPE array. The access methods are defined as properties of the COMBOBOX control and these properties are called: get_opt_cnt_func_name, get_opt_func_name and is_opt_selected_func_name.

get_opt_cnt_func - return the number of items in the list
get_opt_func - return item N of the list
is_opt_selected_func - return true (not 0) if item N is currently selected, return false (0) otherwise
These functions can be either internal XPE interface functions (e.g. WINCTL::dismiss_control), external user written XPE functions or external user written C++ functions located in a dynamic link library.