| New | Comment |
|---|---|
| header create |
Creates a new row of column headers. The result is a unique ID for that header-row. |
| header delete |
Deletes one or more header-rows. The top header-row, created when a treectrl is created, cannot be deleted. |
| header cget header configure |
These commands work on both entire header-rows and individual columns within header-rows. The column configure command may also be used to configure column headers in the top header-row. |
| header bbox header compare header count header element header id header image header span header state header style header text header tag |
These commands have the same syntax as the item subcommands of the same name. Header-rows are actually implemented as items. The header image and header text commands will change either the first image or text element in a custom style assigned to a column header, or the -image and -text options of a column header when no custom style is assigned. The header state command operates on header states, which are distinct from item states. See the updated section called STATES in the manual. |
| header dragcget header dragconfigure |
Same as the column dragcget and column dragconfigure commands. The visual feedback when dragging column headers has changed. As a result, the following options are deprecated and have no effect:
|
| Option | Comment |
|---|---|
| All
these options related to column headers are no longer a part of a
column itself. Instead, these options were moved to the new
column header API. These options can still be accessed using column cget and column configure, but only for the top row of column headers. To access these options in header-rows other than the top row, use the header cget and header configure command. |
| Arguments Changed | Comment |
|---|---|
| element create element cget |
The new option -statedomain accepts a value of item or header. The default value is item.
This option is used to distinguish between elements used in items and
elements used in column headers, since items and headers have a
different
set of state flags. The value of this option cannot be changed. |
| New | Comment |
|---|---|
| item state define item state linkage item state names item state undefine |
All the old subcommands of the widget state command are now in the updated item state
command. This was done because items and headers have a different
set of states. Defining new header states is done using the new header state command. |
| Arguments Changed | Comment |
|---|---|
| style create style cget |
The new option -statedomain accepts a value of item or header. The default value is item.
This option is used to distinguish between styles used in items and
styles used in column headers, since items and headers have a different
set of state flags. The value of this option cannot be changed. |
| style layout |
A new style layout option was added called -center. The -center option allows one or more elements to be centered within a style. |
| Arguments/Result Changed | Comment |
|---|---|
| bbox |
Three new areas are defined, header.left, header.none, and header.right,
to get the bounds of the different groups of locked/unlocked column
headers. The words after "header." are each possible value of the
column option -lock. |
| identify |
To make the result of this
command easier to use, especially with the new column header code, a
new option was added that sets the elements of an array variable rather
than returning the result as a list..t identify -array id $x $yThe above call will alter the array variable named "id" with info about what is under the given coordinates. |
| New | Comment |
|---|---|
| -headerfont |
This
is the font used for drawing text in column headers. The default
value is TkHeadingFont where that font is defined (usually on Tk 8.5+),
otherwise it is the default listbox font. On Mac OS X,
TkHeadingFont is the small system font used for drawing text in the
fixed-height headers. This new option results in a different default look to column text on X11, where TkHeadingFont is a bold font. |
| -headerfg -headerforeground |
This is the foreground text
color used when drawing text in column headers. On Gtk+, the
system theme may override this color. |
.t element create MyHeaderElement text -statedomain header
.t style create MyHeaderStyle -statedomain header
| New | Comment |
|---|---|
| -buttony |
This
option allows you to specify the distance from the top of an item that
the expand/collapse button is drawn. When the value of this
option is unspecified, the button is centered vertically in the item. |
| New | Comment |
|---|---|
| -gridleftcolor -gridrightcolor |
So-called "grid lines". These
two options specify a color or gradient to draw on the left and/or
right edge of the column. The lines are drawn overtop an item's
style and down in the whitespace region below any items. |
| Usage Changed | How it changed |
| -itembackground |
Item background colors can be a Tk color or a gradient name. Item background colors are now drawn below items in the whitespace region even when item wrapping is being used. Previously item background colors were not drawn below items when wrapping was used. |
| -textcolor |
This is now a per-state option, just like the -background option, which may be incompatible.
If you previously specified a Tk color name with a space in it, such as
"light blue", then you will need to make the value a proper list:$T column configure $C -textcolor [list "light blue"]When this option is unspecified (the default), the system theme can specify the color. Currently that behavior is only used with the Gtk+ build of treectrl. |
| New | Comment |
|---|---|
| buttonstate |
The value of this option can be active, normal or pressed.
This is used to change the appearance of the expand/collapse
buttons. On Gtk+ the buttons change appearance when the mouse
pointer is over them and when they are clicked. On Mac OS X the
buttons change appearance when they are clicked. On MS Windows
the buttons change appearance when the mouse pointer is over them, but
only when the Explorer theme is used (see the new theme setwindowtheme command). |
| Arguments Changed | What changed |
| create |
New option -enabled. |
| collapse expand toggle |
A new option -animate
was added to support animated disclosure triangles on Gtk+ and Mac OS
X. The library scripts pass the -animate option when clicking on
a button, but not when toggling items using the keyboard. |
| New | Comment |
|---|---|
| -fill |
Specifies the fill color for the
selection rectangle. The value can be a Tk color or a gradient
name or an empty string (the default). When this option isn't an
empty string the dotted outline is not drawn. By specifying the
name of a semi-transparent gradient a modern-looking selection
rectangle can be achieved. |
| -outline |
Specifies the outline color for
the selection rectangle. The value can be a Tk color, a gradient name, or an empty
string which is the default. When this option isn't an empty
string the dotted outline is not drawn. |
| Behavior Changed | What changed |
|---|---|
| -union |
Previously, nesting -union elements had undefined behavior. Now it is ok to include an element with -union layout in another element's -union list. |
| New | Comment |
|---|---|
| -bgimage |
This is a synonym for the -backgroundimage option. |
| -bgimageanchor | Controls
the alignment of the -backgroundimage. The value is a standard Tk
anchor position such as "nw", "se" or "center", etc. The image is
aligned to the content area when the image doesn't scroll, otherwise
the image is aligned to the canvas. The default is "nw". |
| -bgimageopaque |
A boolean that indicates whether
or not the -backgroundimage is partially transparent. This is
needed because there is no way to tell in Tk whether an image contains
transparency. The default is true, so if you use a transparent
-backgroundimage you must set this to false. |
| -bgimagescroll |
Controls whether the
-backgroundimage scrolls along with the items or remains locked in
place. The value can be an emptry string for no scrolling, "x"
for horizontal scrolling only, "y" for vertical scrolling only, or "xy"
(the default) for scrolling in both directions. |
| -bgimagetile |
Controls whether the
-backgroundimage is tiled along the x and y axes. The value can
be "", "x", "y" or "xy" (the default). |
| -buttontracking |
On Mac OS X and Gtk+ the
expand/collapse buttons don't toggle when they are clicked, only when
the mouse button is released over them, like regular pushbuttons.
The value of this option is a boolean; when true the buttons toggle
when the mouse button is released, when false the buttons toggle when
clicked. The default is true on Mac OS X and Gtk+, false on Win32 and X11. |
| -canvaspadx -canvaspady |
These options allow whitespace
margins around the edges of the canvas. This is useful for 2D
views where you don't want the items to butt against the window
borders. The value of each option is a list of one or two screen
distances specifying the width of the left/right margins and the height
of the top/bottom margins respectively. |
| -itemgapx -itemgapy |
These options allow whitespace gaps between adjacent items.
This is useful for 2D views such as an icon view in a file browser or
an image thumbnail list. The value of each option is a screen
distance defaulting to zero. |
| -xscrollsmoothing -yscrollsmoothing |
When these options are set to
true and the xview or yview commands are called to scroll by "units",
scrolling occurs according to the -xscrollincrement or
-yscrollincrement options, and all other scrolling is done as if the
-xscrollincrement or -yscrollincrement options were set to 1. The
effect is that when dragging the scrollbar thumb scrolling is very
smooth, but when clicking the scrollbar buttons scrolling is done in
coarser increments. |
| Usage Changed | How it changed |
| -columnresizemode |
The default value is "realtime", it used to be "proxy". |
| -showlines |
The default value is false on Mac OS X and Gtk+, true on Win32 and X11. |
| -usetheme |
The default value is now true. Complete reversal from previous versions, head for the hills. |
| New | Comment |
|---|---|
| gradient | Linear
gradients! There are a number of issues when using gradients, see
the demos and the relevant sections in the manual page for more info. |
| theme |
The theme platform command returns the API used to draw themed parts of the treectrl.
$T theme setwindowtheme "Explorer"
...on Windows 7 the disclosure triangles of the Explorer file browser will be used rather than +/- buttons. |
| Ignored | Comment |
|---|---|
| -doublebuffer | This option no longer has any effect but was left in to avoid incompatibilities. Instead, the amount of double-buffering is chosen depending on the platform. Modern platforms such as Mac OS X double-buffer each toplevel whereas older platforms such as Windows XP do not. |
| New | Comment |
|---|---|
| -lmargin1 | Specifies how much the first line of text should be
indented. |
| -lmargin2 | Specifies how much the 2nd or greater lines should be indented when a line of text wraps. |
| Arguments/Result Changed | What changed |
|---|---|
| see | OLD: $T see $item NEW: $T see $item ?$column? ?-center xy? You can specify a particular column to scroll into view horizontally. The -center option will center the item/column in the window instead of performing the minimal amount of scrolling to bring it into view at the edge of the window. |
| New | Comment |
|---|---|
| -wrap | When this option is true an item will be the first in a
horizontal (when the treectrl option -orient=horizontal)
or a vertical (when the treectrl option -orient=vertical)
range of items. See the new "iMovie (Wrap)" demo. |
| New | Comment |
|---|---|
| -showrootchildbuttons | Similar to -showrootlines,
this boolean option controls the display of expand/collapse buttons
next to child items of the root item. |
Issues regarding the incompatibility of 8.4 built TkTreeCtrl working in 8.5 were resolved. The Mac OS X API issues noted for 2.2.4 remain (they relate to difficult to reconcile core drawing changes).
A Windows DLL manifest is now embedded to address native theme drawing issues.
Under Mac OSX some internal changes to Tk 8.4.15 and Tk 8.4.17 result in incompatibilities:
| New | Comment |
|---|---|
| -columntagexpr -itemtagexpr |
These boolean options can be used to turn off tag expressions in column descriptions and item descriptions. When the val |