TABLE dialog element

Top  Previous  Next

Syntax:

 

DIALOG ADD,TABLE,<name>,<top>,<left>,<width>,<height>,<column headers>,<tooltip>,<styles>

Description:

 

This dialog element displays a table with resizable columns with headings. It can be used in a similar way to a LIST dialog element. It is also possible to sort the information in the table by clicking on the column headings.

The <column headers> are specified as a single parameter, with the vertical bar '|' character used to separate each column heading. By default, columns are sized to fit the headings. Optionally, you can specify a width (in pixels) and a justification for each heading by putting a value followed optionally by the letter L (left), R (right) or C (center) in square brackets after the caption text.

Tab characters must be used to separate the data that is to go into separate columns. A 16 x 16 pixel bitmap may be specified to appear at the left hand side of each item in the table. The bitmap must be specified using a filename or resource filename, at the end of the string, and is separated from the data by the current field separator character (as with the BITCOMBO and BITLIST dialog elements.) Because of this, the current field separator cannot be a tab character when adding data to a table.

Styles:

In addition to user-defined styles to change the default font style and color, the following styles may be used with this dialog element:

 

CLICK

A <name>CLICK event is generated when an item in the table is selected with the mouse or the cursor keys. Note: Due to the way this element is implemented internally, these events also occur when data is written to the table. Unwanted events can be discarded using a while @event() / wend loop after the table has been updated.

DBLCLICK

A <name>CLICK event is generated when an item in the table is double clicked.

COLUMNSORT

The contents can be sorted into alphabetical order of the items in a particular column by clicking on that column header. Clicking the header a second time will sort the data into reverse order. This style should not be used at the same time as the SORTED style, or they will conflict with each other. The element will automatically try to determine whether the data in the column is numeric, text or [VDS6] a date formatted according to the current date format settings, so data of these types should not be mixed in the same column if this style is used.

MULTI

Allows multiple rows to be selected.

SORTED

The contents are automatically sorted based on the items in the first column.

<cursor style>

The cursor will change to the named style when the pointer is over the dialog element. Valid styles are: NONE, ARROW, CROSS, IBEAM, SIZE, NESW, NS, NWSE, WE, UP, WAIT, DRAG, NODROP, HSPLIT, VSPLIT, MULTI, SQL, NO, HELP, HAND.

See also: