New | Comment |
---|---|
-itemjustify | This option allows item styles to to justified separately from the image/text in the column header. If the value of this option is unspecified (the default), then item styles are justified according to the -justify option of the column. |
Usage Changed | How it changed |
---|---|
-button | The value of this option can now be the word auto (or any abbreviation) in which case a button is drawn only when the item has at least one child item with its item option -visible set to true. |
.t item id "root child end-1" ; # get the second-to-last child of the root item
Deprecated | What to use instead |
---|---|
-defaultstyle | The -itemstyle option of a column. |
Arguments/Result Changed | What changed |
---|---|
contentbox | The return value is an empty string if the content area is totally obscurred by column headers, borders, and/or locked columns. Typically this will only happen if the window is too small. |
selection get | Accepts 2 optional arguments to allow in-place lindex and lrange queries of
the selection. For example:.t selection get 0 ; # the first selected item |
New | Comment |
bbox | Returns the bounding box of different areas of the
window. For example:.t bboxwill return the bounds of the window, and: .t bbox headerwill return the bounds of the column headers, and: .t bbox contentwill return the same result as the [contentbox] command, and: .t bbox leftwill return the bounds of the left-locked and right-locked columns. |
Renamed |
New name |
---|---|
-tag | -tags |
New | Comment |
-lock | This option allows columns to stick to the left or right edge of the window. Locked columns can scroll vertically but not horizontally. Valid values for this option are none (the default), left or right. |
-itemstyle | Specifies the name of a style to set in this column for newly-created items. This option replaces the treectrl option -defaultstyle. |
-uniform | These two options
operate the same as the grid geometry manager options of the same name.
For example:.t column configure 0 -uniform awill give columns 0 and 1 the same requested width, whichever is the larger of the two columns. And: .t column configure 0 -uniform a -weight 2will give column 0 twice the maximum of the requested widths of columns 0 and 1. And: .t column configure 0 -expand yes -weight 2will give column 0 twice the extra space as column 1. |
-weight |
Arguments/Result Changed | What changed |
---|---|
column count | Takes an optional column-description argument; the
result is
the number of columns that match the column description. For example:.t column count visiblewill return the number of columns whose -visible option is true, and: .t column count {tag a^b}will return the number of columns with either tag "a" or "b", but not both. |
New | Comment |
column tag add | Columns can have a list of tag names. Previously only a single tag was allowed. The tail column no longer has the word "tail" as a tag, but it is still referred to by the word "tail" in column descriptions. |
column tag expr | |
column tag names | |
column tag remove |
New | Comment |
---|---|
-tags | Tags are textual labels applied to items to group them. Tags do not affect the appearance or behaviour of items. Tags can be used in item descriptions to operate on multiple items. More information can be found in the man page. |
Arguments/Result Changed | What changed |
---|---|
item count | Takes an optional item-description argument; the result
is the number of items that match the item description. For example:.t item count visiblewill return the number of items that are displayed (i.e., those whose ancestors are all expanded, -visible options are true, etc), and: .t item count {tag a^b}will return the number of items with either tag "a" or "b", but not both. |
item create | New option -tags specifies an initial list of tags for created items. |
item id | Returns a list of item ids if the item description
matches multiple items. For example:.t item id allwill return a list of ids for all items, and: .t item id "$item children"will return the ids of every child of an item. |
New | Comment |
item descendants | Returns the ids of the children, grandchildren, etc of an item. |
item enabled | Gets and sets the enabled state for items. All items are enabled when first created. Disabled items cannot be selected, and are ignored by the default key-navigation and mouse bindings. |
item tag add | Add tags to items. For example:.t item tag add all {a b c}will add tags "a", "b" and "c" to every item. |
item tag expr | Evaluate a tag expression against items. For example:.t item tag expr $item areturns 1 if an item has tag "a". Also: .t item tag expr $item a||breturns 1 if an item has tag "a" or "b". |
item tag names | Return a list of tag names assigned to items. For
example:.t item tag names $itemreturns the tag list for an item, and: .t item tag names allreturns every tag assigned to any item. |
item tag remove | Remove tags from items. For example:.t item tag remove all {b c}will remove tags "b" and "c" from any items that have them. |
set canvas [canvas .t.canvas ...]to this:
.t item element configure $item $column myElement -window $canvas
set frame [frame .t.clip -borderwidth 0]The -clip option tells the window element to manage the geometry of both the -window widget (i.e, the frame) and its first child widget (i.e., the canvas). In this case, the frame widget is kept sized and positioned so that it is never out-of-bounds. You can see this in the "Big List" and "Firefox Privacy" demos.
set canvas [canvas $frame.canvas ...]
.t item element configure $item $column myElement -window $frame -clip yes
.t item id "list [list $a $b $c]"
.t item id "range $first $last"
.t item id "$item ancestors"
.t item id "$item children"
.t item id "$item descendants"
.t item id "all depth 2" ; # find all items that are children of the root's children
.t item id "depth 2" ; # ditto
.t item id "first !visible" ; # find the first item that is not displayed
.t item id "first state {selected !open}" ; # find the first item that is selected and collapsed
.t item id "$item children tag {a && !b}" ; # find children of $item that have tag "a" but not tag "b"
.t item id "all !visible state myState" ; # find every item that is not displayed with user-defined state "myState"A list of qualifiers may be used as the first part of an item description. This gives the same result as "all" followed by the qualifiers. For example:
.t item id "!visible state myState" ; # same as the previous example
.t column configure "range 1 10" -tags {a b c}
.t column delete "tag a"
.t column id "tag {a || b}"
.t item configure "depth 1" -button yes
.t item count visible
.t item element configure "root children" all elem1 -text "Hello"
.t item id "visible"
.t item image all all image1
.t item style map "tag {a && !b}" "tag c" style2 {style1.elem1 style2.elem2}
.t item style set all all style1
.t item state forcolumn all all state1
.t item state set "tag current" ~mouseover
.t item remove "state selected"
.t item span "range 1 10" "range 10 last" 2
.t item text "root children" all "Hello"
Arguments/Result Changed | What changed |
---|---|
column delete |
Added an optional second argument allowing a range of columns to be deleted. |
New | Comment |
---|---|
-itemwidth | |
-itemwidthequal | Deprecates the column -widthhack option. |
-itemwidthmultiple | Deprecates the column -stepwidth option. |
Deprecated | What to use instead |
---|---|
-stepwidth | treectrl's -itemwidthmultiple option |
-widthhack | treectrl's -itemwidthequal option |
New | Comment |
---|---|
element perstate | Like [item element perstate]. |
New | Comment |
---|---|
-height | Overrides the treectrl's -itemheight option |
Deprecated | What to use instead |
---|---|
item element actual | item element perstate |
item complex | item element configure |
Behaviour Changed | What changed |
item bbox | No longer returns an error if no style had been assigned to the column. |
item state forcolumn | No longer returns an error if no style had been assigned to the column. |
item style set | Does nothing when replacing a style with the same
style.
Previously the old style was freed before assigning the new style,
losing the element config info if the old and new styles were the same. Potential incompatibility |
Arguments/Result Changed | What changed |
item create | Added options: -count -height, -nextsibling, -open, -parent, -prevsibling, and -returnid. Multiple items may be created with one call using the -count option. |
item element configure | Multiple elements in multiple columns may be configured with a single call. Use '+' to separate elements, and ',' to separate columns. See the docs. |
item style set | When no column is specified, returns a list of one
style name
per column. Previously, the list would have less values than the number
of columns if no styles had ever been assigned to the rightmost
column(s). Potential incompatibility |
item text | When no column is specified, returns a list of one string per column. |
New | Comment |
item image | Partner to the [item text] command. |
item element perstate | Not really new, just renamed from [item element actual]
to
better describe what it does. Accepts a new optional argument which
specifies the state to use when determining the value of the per-state
option. The following options no longer return a default value if the per-state option itself does not have a value specified:
|
item span | A style may now be displayed over multiple adjacent
columns. |
New | Comment |
---|---|
notify unbind |
Let's you unbind all scripts from an object with one call. |
Replaced | What to use instead |
---|---|
-openbuttonimage | -buttonimage |
-closedbuttonimage | -buttonimage |
-openbuttonbitmap | -buttonbitmap |
-closedbuttonbitmap | -buttonbitmap |
Usage Changed | How it changed |
-backgroundmode | The values "index" and "visindex" are deprecated. The value "order" should be used instead of "index", and "ordervisible" should be used instead of "visindex". This brings agreement with the new "item order" command which replaces the "item index" command. |
-treecolumn | This used to be any integer value which may or may not have corresponded to an actual column. Now the value must be a valid column description, or an empty string to indicate no column should display buttons/lines. |
New | |
-backgroundimage | |
-columnprefix | |
-columnresizemode | |
-itemprefix | |
-minitemheight | |
-usetheme |
Deprecated | What to use instead |
---|---|
compare | item compare |
index | item id |
numcolumns | column count |
numitems | item count |
range | item range |
Removed | What to use instead |
---|---|
-relief |
-state |
-sunken | -state |
Renamed |
New name |
-arrowpad | -arrowpadx |
Usage Changed | How it changed |
-background | This is now a per-state option. See COLUMNS in the help file for valid state names. |
New |
|
-arrowbitmap |
|
-arrowimage | |
-arrowpady | |
-maxwidth | |
-resize | |
-state | |
-textlines |
Deprecated | What to use instead |
---|---|
column index | column id |
Arguments/Result Changed | What changed |
column configure |
A column description of "all" is allowed if at least
one
option-value pair is given. |
column create | The result is a unique identifier. Previously the result was an index in the list of columns. |
column delete | A column description of "all" is allowed. |
New | Comment |
column compare | |
column count | replaces "numcolumns" |
column dragconfigure | |
column dragcget | |
column id | replaces "column index" |
column list | |
column order |
Removed | What to use instead |
---|---|
item index | item order |
New | Comment |
item compare | replaces "compare" |
item count | replaces "numitems" |
item id | replaces "index" |
item order | replaces "item index" |
item range | replaces "range" |
Arguments/Result Changed | What changed |
---|---|
notify generate |
Added optional percentsCommand argument |
notify install | Old syntax (supported but deprecated):notify install event eventName notify install detail eventName detailNew syntax: notify install <eventName> notify install <eventName-detail> |
notify linkage | Old syntax (supported but deprecated):notify linkage eventName notify linkage eventName detail notify linkage <eventName> notify linkage <eventName-detail> |
notify uninstall | see notify install above |
Usage Changed | How it changed |
---|---|
-iexpand | Two new flags "x' and "y" are allowed. Previously, only
the
-ipadx and -ipady padding could be expanded by this option. The new xy
flags expand the display area of the element, not the padding. To
update your code, you will probably want to change this:$T style layout $S $E -iexpand we $T style layout $S $E -iexpand x |
New |
|
-height | |
-maxheight | |
-maxwidth | |
-minheight | |
-minwidth | |
-sticky | |
-width |