diff options
Diffstat (limited to 'demos/outlook-folders.tcl')
-rw-r--r-- | demos/outlook-folders.tcl | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/demos/outlook-folders.tcl b/demos/outlook-folders.tcl index 7fceacc..7bd8ed9 100644 --- a/demos/outlook-folders.tcl +++ b/demos/outlook-folders.tcl @@ -11,11 +11,24 @@ proc DemoOutlookFolders {} { if {$height < 18} { set height 18 } + + # + # Configure the treectrl widget + # + $T configure -itemheight $height -selectmode browse \ -showroot yes -showrootbutton no -showbuttons yes -showlines yes + # + # Create columns + # + $T column create -text Folders + # + # Create elements + # + $T element create e1 image $T element create e2 text -fill [list $::SystemHighlightText {selected focus}] \ -lines 1 @@ -26,6 +39,10 @@ proc DemoOutlookFolders {} { $T element create e6 rect -fill [list $::SystemHighlight {selected focus} gray {selected !focus}] \ -showfocus yes + # + # Create styles using the elements + # + # image + text set S [$T style create s1] $T style elements $S {e6 e1 e2} @@ -56,6 +73,10 @@ proc DemoOutlookFolders {} { $T style layout $S e4 -expand ns $T style layout $S e6 -union [list e3] -iexpand ns -ipadx 2 + # + # Create items and assign styles + # + $T item style set root 0 s1 $T item complex root [list [list e1 -image outlook-main] [list e2 -text "Outlook Express"]] |