treectrl - Create and manipulate hierarchical multicolumn widgets
The treectrl command creates a new window (given by the pathName argument) and makes it into a treectrl widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the treectrl such as its background color and relief. The treectrl command returns the path name of the new window. At the time this command is invoked, there must not exist a window named pathName, but pathName's parent must exist.
A treectrl is a listbox widget which displays items in a one- or two-dimensional arrangement. Items have a parent-child relationship with other items. Items may be arranged from top-to-bottom or from left-to-right. Items may be spread about one or more columns. Each item-column may be configured to span one or more adjacent item-columns. The visibility of items can be set individually.
Items have a set of states, which are boolean properties. For each column of an item there is a style associated, which determines how to display the item's column taking into account the item's current state set. New states may be defined to further control the appearance of items; these custom states may be turned on or off in individual columns of items.
Multiple rows of column headers are supported. Column headers have platform-native appearance on Windows, Mac OS X, and Gtk+. The appearance of column headers may be customized using styles.
Columns may be rearranged by the user using drag-and-drop. One column can be specified to display the data in a hierarchical structure. The visibility of columns can be set individually.
A treectrl can display a user-resizable selection rectangle called the marquee. Another feature, the drag image, may be used to provide feedback during drag-and-drop operations. Both of these are features commonly found in file browsers.
A treectrl can generate events when various things happen, such as changes to the selection, or a parent item being toggled open or closed. Scripts may be bound to these events. New events can be defined.
A treectrl can display a background image. The background image can be configured to be scrolled and tiled on each axis individually.
See the option manual entry for details on the standard options.
Specifies the name of an image to draw as the list background. Other options control whether the image is tiled and whether the image scrolls. If the image is transparent it is drawn on top of any column -itembackground colors.
Specifies how the background color of items is chosen in each column. The value should be one of row, column, order, or ordervisible. The default is row. This option has only an effect for columns which have -itembackground defined as list of two or more colors (see section COLUMNS below for more on this). If row or column is specified, the background color is chosen based on the location of the item in the 1- or 2-dimensional grid of items as layed out on the screen; this layout of items is affected by the -orient and -wrap options as well as item visibility. When order or ordervisible is specified, the background color is chosen based on the result of the item order command, regardless of the layout of items.
Synonym for -backgroundimage.
Specifies how the background image should be aligned in any of the forms acceptable to Tk_GetAnchor. Must be one of the values n, ne, e, se, s, sw, w, nw, or center. The default is nw. When the background image scrolls, the anchor position is relative to the canvas, otherwise it is relative to the contentbox.
Specifies a boolean indicating whether or not the background image is fully opaque. This is needed because there is no way in Tk to determine whether an image contains transparency or not. The default value is true, so if you use a transparent -backgroundimage you must set this to false.
Specifies whether the background image scrolls along with the items or whether it remains locked in place relative to the edges of the window. The value must be a string that contains zero or more of the characters x or y. The default is xy.
Specifies whether the background image is tiled along the x and/or y axes. The value must be a string that contains zero or more of the characters x or y. The default is xy.
Specifies the name of a bit