What: TkTreeCtrl Where: http://sourceforge.net/projects/tktreectrl/ Description: multi-column hierarchical listbox widget for Tk. It is a stubs-enabled extension (written in C). Builds and works on Win98, Peanut-Linux 9.4, and appears to work on SPARC Solaris 2.6. (According to a posting on comp.lang.tcl it also works on MacOS Classic and MacOS X). Documentation is now available in the CVS repository. Currently at version 1.0. Updated: 12/2002 Contact: See web site ---- Screenshots and homepage: http://tktreectrl.sourceforge.net/ ---- You can download win32 binaries, and there is a nice '''demo and docs included'''. Doesn't only do tree widgets, it can also do fancy image thumbnail tables - see the demo. ---- ''How about someone adding a screenshot'' [MPJ] ~ Ok ... Here is one from the demo script that comes with TkTreeCtrl. [http://mywebpages.comcast.net/jakeforce/tktreectrl.jpg] ---- ---- '''Outdated''' Early user observations: * The generation is "dirty"; it superficially trespasses on Tcl internals. It's widely believed that this is correctable. * Developers really, really like the widget itself. ---- [TR] - Since there is no tutorial on the usage of this widget, I had to fiddle around with it for quite a time in order to learn its use. Here is a quick intro: '''Components of a treectrl''' The widget consists of at least one ''column'' (for table-like output). Each entry in the widget is called an ''item'' and reaches over all columns. The items are composed by adding some ''elements'' together to ''styles''. The styles are applied to the items and then it shows up in the widget. In other words (taken from the manual page largely): * ''element:'' The smallest building block. One or more elements together can be combined to a style, which can be considered as a template for an item. These are the possible element types: bitmap, border, image, rect, and text. * ''item:'' A set of elements. The look of the items is desribed by styles. * ''styles:'' Could be considered as a geometry manager for the elements of one item. '''A short example''' Now let us use this knowledge to create a little example. We first create the widget after having started wish: package require treectrl treectrl .t pack .t Now we configure it to have one column. Note: elements, styles, and items are created using the ''create'' subcommand while columns are created by using the subcommand ''configure'' on a new index (here 0). Our column will get a label called "Items" and the column should use the whole width of the widget by default. .t column configure 0 -text Items -expand yes -button no Before we can add our first item, we need to specify what elements the item should have (we just make a text element here called ''e1'') and what style it should have (called ''s1'' here): .t element create el1 text .t style create s1 # apply style s1 to element el1: .t style elements s1 el1 Now, we are ready to add the first item: # create a new item: set itm [.t item create] # apply the style from above to the first (and only) column of the item: .t item style set $itm 0 s1 # give the item a label: .t item text $itm 0 "Hello World" # and display it as the las child of the root node: .t item lastchild root $itm This is it. An item saying ''Hello World'' should appear. ---- [jmn] 2004-09-30 Anyone got a working build of this for FreeBSD 5.x? When I run the demo application, I get a core dump whenever I try to use the horizontal scrollbar. [A/AK] 2004-10-01 Try latest CVS sources with the patch from [http://sw4me.com/private/tktreectrl.diff] [jmn] 2004-10-01 That fixed it. Thanks! [JH] 2004-10-09 That patch is in the latest sources, along with several other changes that bring the build system to TEA 3.1 and simplify some other build things. You should be able to 'make demo' on Windows or unix directly from CVS sources, assuming you configured correctly. ---- [IMA] 2004-11-22 Does anybody know how to edit items in place in TkTreeCtrl? Thanks [Peter Newman] 23 November 2004: 1) See the Explorer demos (they have filename editing). Or; 2) Use `item bbox' to find out where the item to be edited is, and `place' your entry or whatever widget there. ---- [[ [Category Package] | [Category GUI] ]]