<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Slicer3%3AGUI_Experiments%3ATkTreeCtrl</id>
	<title>Slicer3:GUI Experiments:TkTreeCtrl - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Slicer3%3AGUI_Experiments%3ATkTreeCtrl"/>
	<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Slicer3:GUI_Experiments:TkTreeCtrl&amp;action=history"/>
	<updated>2026-05-20T11:15:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Slicer3:GUI_Experiments:TkTreeCtrl&amp;diff=3863&amp;oldid=prev</id>
		<title>Marianna: 1 revision</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Slicer3:GUI_Experiments:TkTreeCtrl&amp;diff=3863&amp;oldid=prev"/>
		<updated>2008-05-15T18:01:47Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 18:01, 15 May 2008&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key mediawiki_slicer:diff::1.12:old-3862:rev-3863 --&gt;
&lt;/table&gt;</summary>
		<author><name>Marianna</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Slicer3:GUI_Experiments:TkTreeCtrl&amp;diff=3862&amp;oldid=prev</id>
		<title>Pieper: /* Example */</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Slicer3:GUI_Experiments:TkTreeCtrl&amp;diff=3862&amp;oldid=prev"/>
		<updated>2007-08-05T21:06:41Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Background ==&lt;br /&gt;
&lt;br /&gt;
[http://tktreectrl.sourceforge.net/ TkTreeCtrl] is a pretty amazing set of interface functionality for displaying trees where each row can be a multi-column list and/or a set of interface widgets.  The interface is highly configurable (as shown in the demos) and very efficient.  It is a cross-platform tcl extension.&lt;br /&gt;
&lt;br /&gt;
As of late June 2007, TkTreeCtrl is built as part of KWWidgets and is exposed for use in Slicer3.  Note that it does not yet have a C++ API so any use of TkTreeCtrl must be implemented in tcl (this code can be invoked from C++ using the Script() method on a KWWidget).&lt;br /&gt;
&lt;br /&gt;
== Running the Demo in Slicer3 ==&lt;br /&gt;
&lt;br /&gt;
First, download and unpack the package from [http://tktreectrl.sourceforge.net/ TkTreeCtrl].  Version 2.2.3 or later should work.&lt;br /&gt;
&lt;br /&gt;
In Slicer3:&lt;br /&gt;
* open the tcl console (Control-T or use the menu)&lt;br /&gt;
* cd to the directory where you unpacked TkTreeCtrl&lt;br /&gt;
* cd to the demos directory&lt;br /&gt;
* type the following commands&lt;br /&gt;
 proc console {args} {}&lt;br /&gt;
 source demo.tcl&lt;br /&gt;
 wm deiconify .&lt;br /&gt;
* experiment and have fun!&lt;br /&gt;
** note that the File menu includes options for viewing the source of each demo (note how brief and elegant each demo is!)&lt;br /&gt;
** you can even watch the events as you interact with the tree demos&lt;br /&gt;
** you can edit the configuration parameters of the trees on the fly and see the visual result&lt;br /&gt;
&lt;br /&gt;
== Plans ==&lt;br /&gt;
&lt;br /&gt;
* Test the widget &lt;br /&gt;
** Example MRML tree (Steve) (see the ColorTree example described below)&lt;br /&gt;
** Model Hierarchy display properties (Alex)&lt;br /&gt;
** EMSegment (Brad)&lt;br /&gt;
** QueryAtlas (Wendy)&lt;br /&gt;
* Propose useful C++ API (all) for implementation by Sebastien and Yumin&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://wiki.tcl.tk/6064 tcl wiki entry on tktreectrl]&lt;br /&gt;
* [http://tktreectrl.sourceforge.net/Understanding%20TkTreeCtrl.html a tutorial]&lt;br /&gt;
* [http://tktreectrl.sourceforge.net home page]&lt;br /&gt;
&lt;br /&gt;
Note there is an HTML manpage with the source distribution that you can load into a browser to use as a reference.  &lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
The simple example below is taken from [http://wiki.tcl.tk/6064] and can be pasted directly into the slicer3 tcl console:&lt;br /&gt;
&lt;br /&gt;
 catch &amp;quot;destroy .t&amp;quot;&lt;br /&gt;
 toplevel .t&lt;br /&gt;
 package require treectrl&lt;br /&gt;
 treectrl .t.t&lt;br /&gt;
 pack .t.t&lt;br /&gt;
 .t.t column create&lt;br /&gt;
 .t.t column configure 0 -text Items -expand yes -button no&lt;br /&gt;
 .t.t element create el1 text&lt;br /&gt;
 .t.t style create s1&lt;br /&gt;
 .t.t style elements s1 el1&lt;br /&gt;
 set itm [.t.t item create]&lt;br /&gt;
 .t.t item style set $itm 0 s1&lt;br /&gt;
 .t.t item text $itm 0 &amp;quot;Hello World&amp;quot;&lt;br /&gt;
 .t.t item lastchild root $itm&lt;br /&gt;
&lt;br /&gt;
A more sophisticated example has been checked into the slicer3 svn (see [http://www.na-mic.org/ViewVC/index.cgi/trunk/Base/GUI/Tcl/ColorTree.tcl?view=log]).  To try this, open the tcl interactor and type:&lt;br /&gt;
  source $::env(SLICER_HOME)/../Slicer3/Base/GUI/Tcl/ColorTree.tcl&lt;br /&gt;
  ::ColorTree::ShowDialog&lt;/div&gt;</summary>
		<author><name>Pieper</name></author>
		
	</entry>
</feed>