tree_to_table treeWhat it does:
generates a table display of a given treeDefined in: /web/philip/tcl/ad-trees.tcl
Source code:
set h [tree_height $tree] set result "<table border>\n" for {set level 0} {$level<$h} {incr level} { append result "<tr>\n" foreach subtree [tree_level $tree $level] { if { [llength $subtree]==1 } { set rowspan [expr $h-$level] } else { set rowspan 1 } append result " <td valign=top align=center rowspan=$rowspan colspan=[tree_width $subtree]>[head $subtree]</td>\n" } append result "</tr>\n" } append result "</table>\n" return $result