You are here: Home News & Events Development Update Development Update October 2006 - Dynamic Combo List Management
Document Actions

Development Update October 2006 - Dynamic Combo List Management

Dynamic Combo-Listbox, fully controlled (i.e. populated) within the 4GL code and optional field validation (Combo behaviour).


Dynamic Management of Combo List Boxes

Previously, in Hydra4GL 3.0 - 4.2, combo boxes were populated statically using an ’Include’  statement as part of the Form file.

In Hydra4GL 4.3 Combo Widgets no longer carry this limitation; instead, management of the Combo/List field is achieved by passing an index and field value when executing the code. In other words, combo box entries are manageable with standard 4GL function calls. There is a whole range of built in functions to insert, delete, sort and search combo box list entries.
Screen Shot Example: Combo-Listbox with functions

Optional Server Side Validation

The server side field validation can be turned off to allow the entry of values freely or it is possible to pick one from the list (combobox behaviour).

Combo Box Navigation

Keyboard cursor keys can navigate through the combo list with a single keystroke, leading to the entry beginning with the key pressed. Combo box navigation is flexible to support mouse selection, cursor key selection or by typing in the corresponding list item.

 

Combo Box Navigation

Keyboard cursor keys can navigate through the combo list with a single keystroke, leading to the entry beginning with the key pressed. Combo box navigation is flexible to support mouse selection, cursor key selection or by typing in the corresponding list item.

 Screen Shot Example: Window with Combo-Listbox

New Combo Box Functions

‘Hydra4GL’ 4.3 employs the following functions to create dynamic Combo Boxes:

fgl_list_set()

This function takes a Combo Box field and enters a value at a specified location, overwriting any previous value in that location.

fgl_list_insert()

Similarly, the fgl_list_insert() function will insert a value into the Combo Box field at a specified point, not overwriting any other values in the list.

fgl_list_count()

fgl_list_count() simply finds the number of items in a particular Combo Box field.

fgl_list_clear()

fgl_list_clear() deletes the items in the named Combo Box field list between two specified indices.

fgl_list_restore()

Function fgl_list_restore() restores the named list with the original values it was given when created in the Form INCLUDE clause.

fgl_list_get()

This function finds the actual item located at the specified index of the Combo Box field name passed to it.

fgl_list_sort()

Function fgl_list_sort() defines how the Combo box is ordered, i.e., ascending/ descending order.

fgl_list_find()

fgl_list_find() is similar in functionality to fgl_list_get() except that it searches a Combo Box field for the item passed to it and finds the index value associated with that item.