label


In DCL, for historic reasons, the label attribute is typically used to fake column labels, usually by inserting additional spaces, trying to align words with the columns.

For example, say the tabs attribute has value "10 20 30", with the intention of specifying 3 columns of width 10.
A typical label specifying column headers is of the form "header 1     header 2     header 3".

Alternatively the same value for the tabs attribute could be to specify 4 columns, 3 of width 10, one of the remaining width.
In that case a typical label attribute would become "header 1     header 2     header 3     header 4".

In BricsCAD it is possible to have real column labels.
When the column labels are aligned with the columns using spaces, BricsCAD attempts to parse the column headers as follows :


For each column width n, take the next n characters of the label attribute including any trailing spaces.
For the preceeding example, the first 10 characters of the label are "header 1  ".
Including the trailing spaces gives "header 1     ".

Repeating this process properly divides the label attribute in sub-labels.
If the number of sub-labels matches the number of width in the tabs attribute (same amount or one additional column allowed), then actual column labels will be displayed.

If actual column labels are displayed, grid lines will be shown, like when tab_truncate is on.
The division in sub labels by means of the label attribute is rather elaborate.

It is more easy to use the bricscad-only attribute bcad_label, with separation into sub-labels by specifying the tab "\t" symbol.
However, the detection of sub-labels in the label attribute yields a good chance to "automagically" have real column labels in BricsCAD when using legacy DCL code.

special behaviour applies : listboxes only, otherwise standard behaviour applies for label


©  Bricsys NV. All rights reserved.