Last modified 23 months ago Last modified on 2012-10-06 11:36:43

Dynamic Listbox

This is an example of how to create and use a generic listbox. It is a collection of several high level custom widgets.


Listbox Widget

  • Description

Array based listbox made purely of dynamic variables. Compatible types are, numeric (internally real), text, boolean, picture, time, date.

  • Instructions

Place the widget on form and add the following line of code to its object method.

LBOX_HANDLE_EVENT (OBJECT Get name(Object current))
  • Call backs

All events are negated and sent to the container.
You can obtain further information by the accessor method, during events where LISTBOX GET CELL POSITION is applicable, as well as -On Header Click.

LBOX_GET_EVENT_CONTEXT ($thisName;->$columnNumber;->$rowNumber;->$columnName;->$headerTitle;->$columnType)
  • Bound Variable Type

Type is text. Its use is undefined.

  • Methods
LBOX_Remove_all
LBOX_Remove_column
LBOX_Add_column

LBOX_GET_COLUMNS
//Returns the list of header titles and column names.
//Resolve the column name to get a pointer to the array.

//Properties (Read/Write)

LBOX_Get_alignment
LBOX_SET_ALIGNMENT
LBOX_Get_column_width
LBOX_SET_COLUMN_WIDTH
LBOX_Get_enterable
LBOX_SET_ENTERABLE
LBOX_Get_font
LBOX_SET_FONT
LBOX_Get_font_size
LBOX_SET_FONT_SIZE
LBOX_Get_font_style
LBOX_SET_FONT_STYLE
LBOX_Get_format
LBOX_SET_FORMAT
LBOX_Get_list
LBOX_SET_LIST
LBOX_GET_RGB_COLOR
LBOX_SET_RGB_COLOR
LBOX_Get_row_height
LBOX_SET_ROW_HEIGHT
LBOX_GET_SCROLLBAR_VISIBLE
LBOX_SET_SCROLLBAR_VISIBLE
LBOX_Get_size
LBOX_Set_size

//Properties (Read Only)

LBOX_SET_GRID
LBOX_SET_GRID_VISIBLE

LBOX_SET_HEADER_TITLE
//Use LBOX_GET_COLUMNS to get the header title

CHANGE LIST

Added contextual menu to the table list; now you can open an external database form the menu. The menu keeps history of recent databases.

Added contextual menu to the listbox; now you can change the formats of date and time columns.

The graph logic is improved; when a column header is clicked, it becomes the key column (x_values). Otherwise, a sequence number is issued.

Dates as values (i.e. not key column) are integers from the epoch date January 1st, 2001.

The image size is used for pictures columns.


DOWNLOAD

v12 Sample + Component


Attachments