|Home Script Language Display Functions ChartBook Tables Using the Tables|
|See also: Reset, Chartbook, Using the Memos, Using the Charts
Using the Tables
The table component which is available on each tab of the Chartbook is a component which can be used to display text in tabular form.
The table on a particular tab can be accessed via the array property ChartBook.Tables[idx] and its subproperties (with idx as the tab number). Its layout can be configured by the method Configure.
The number of visible rows and columns is determined by the properties NrOfRows and NrOfColumns. In addition to the visible cells, each row has one invisible cell (column index 0) which can be used to store additional hidden information in the table. The cells of the table can be accessed via the property Elem. Numeric strings can be read by using the readonly property AsNumber.
The headers of the columns can be adjusted by using the property Header. The methods AddRow and RemoveRow can be used to add an additional empty row to the end of the table and to remove a particular row from the table. By default, all cells of the table are read-only. However, the table can be switched columnwise into an editable mode by setting the array property ColumnEditable.
Before storing more than a few strings, it is recommended to set the property SuppressPaint to TRUE in order to prevent repeated repaint events. Otherwise, loading the table will be extremely slow.
The rows of the table may be sorted according to any column (including the hidden column 0) by using the method Sort. The method UnSort re-establishes the original order of the rows. Rows may also be sorted interactively by clicking on the corresponding header field if the property SortEnabled is set TRUE.
The visual appearance can be adjusted by the color properties ColorText, ColorBkgdNormal, and ColorBkgdShaded. The property RowColPattern determines the pattern of shaded and normal rows. Note that there are some additional parameters covered by the property Options which may also affect the visual appearance of the table. Any column of the table may also be set up as a checked column (strings with a check box or a radio button left to it) by setting the property ColumnCheckMode accordingly. The check boxes may be ticked off either by clicking them or programmatically by using the property ElemChecked.
The rows of the table can be disabled on an individual basis by using the array property RowEnabled. Disabled rows are displayed in different colors (ColorDisabledText, ColorDisabledBkgd) and cannot be edited by the inplace editor, nor can any associated check boxes be ticked off.