Att ColumnWidths

Revision as of 22:56, 22 June 2016 by Lchrisman (talk | contribs) (Created page with "[[Category::Attributes]] ''new to Analytica 5.0'' == Attribute Att_ColumnWidths == The attribute <code>Att_ColumnWidths</code> stores the widths of table columns that ha...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

[[Category::Attributes]] new to Analytica 5.0

Attribute Att_ColumnWidths

The attribute Att_ColumnWidths stores the widths of table columns that have been manually sized, and hence are not set to be automatically sized.

Initially, edit and result tables automatically select the width of columns based on the width of the content in the cells of that column. By hovering over the boundary between two columns, where the cursor changes to a left-right drag cursor, then hold the mouse down and drag to change the width of the column. You can also select a range of columns and then drag any boundary to change the width of all selected columns to be the same. To remove the manually configured size, enabling the column to again auto-size to the content, you can hover over the right-side column boundary (so that the cursor is a left-right drag cursor) and double click -- or select one or more columns and hover over any column boundary and double click to auto-size the selected columns.

The Att_ColumnWidths attribute is used internally by Analytica, and is not an attribute that Analytica users should read from or write to directly. This page documents the internal format used by this attribute.

Basic structure

The Att_ColumnWidths holds a list that consists of one number (or blank) followed by n pairs, so that the total number of elements is always odd, 2*n+1, where n is the number of pairs. Each pair identifies an index and the widths along that index.

The following is an example of the contents of the Att_ColumnWidths.

[ 67, In1, \([ ,,45,67,,88 ]), In2, \([ 123 ]) ]

In this example, a width of 67 pixels is used when there is no column index. When the column index is index In1, the third column is 45 pixels wide, the fourth column is 67 pixels wide, and the sixth column is 88 pixels wide. All other columns along In1 are auto-sized. When the index is In2, the first column is 123 pixels wide, and all other columns are auto-sized. If In1 has only 5 elements, the Totals column along In1 has a width of 88 pixels.

In this example, the first element of each pair is an index identifier, and the second element is a reference to a list of widths. Any width can be blank (including the first number), which indicates that the element is auto-sized. Internally, these blanks are the special system value Undefined, but print as blanks when viewing or saving the attribute for conciseness.

Local indexes

When the widths are specified along a local index, then the first element of each pair uses Sys_LocalIndex('name') as illustrated in this example:

[, Sys_LocalIndex('L1'), \([101,,,,80]) ]

Comparison Indexes

A result table may have two column indexes when you have selected a Comparison Index. In this case, the column widths are associated with the comparison index (the bottom and fastest varying column header). The attribute encoding is the same as for any other index, but the manually set width for that column is shared by all repeats of that Comparison Index column. For example, in the table shown here

Width of comparison columns.png

the Att_ColumnWidths Of Width_example is

[, In2, \([26,54,89]) ]

Hence, all In2=1 columns are 26 pixels wide, all In2=2 columns are 54 pixels wide and all In2=3 columns are 89 pixels wide. If you change the width of any one of these columns, all the other columns corresponding to the same In2 element change with it.

Comparison columns

See Also

Comments


You are not allowed to post comments.