ttk::treeview column
Gives or sets the options of a column.
PATHNAME column COLUMN
PATHNAME column COLUMN OPTION
PATHNAME column COLUMN OPTION VALUE ?OPTION VALUE ...?
Description
With no OPTION, gives a list of each column option and its value. With one OPTION, gives its value. With pairs, sets the options. The column options are these.
-width: the width in pixels.-minwidth: the smallest width that a drag of the user or a stretch gives.-stretch: a boolean, true when the column gets a share of the extra width of the widget.-anchor: the place of the values in the cells, such aswore.-id: the ID of the column, read-only.
Returns
A list of options and values, a value, or an empty string.
Examples
% ttk::treeview .ttvcl -columns {size}
> .ttvcl column size -width 80 -anchor e
> .ttvcl column size
-width 80 -minwidth 20 -stretch 1 -anchor e -id size
% ttk::treeview .ttvcl2 -columns {size}
> .ttvcl2 column #1 -id
size
Errors
% ttk::treeview .ttvcl3; .ttvcl3 column nocol
Invalid column index nocol
-errorcode NONE
% ttk::treeview .ttvcl4 -columns {a}; .ttvcl4 column a -anchor bogus
bad anchor "bogus": must be n, ne, e, se, s, sw, w, nw, or center
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1