diff options
-rw-r--r-- | demos/layout.tcl | 16 | ||||
-rw-r--r-- | demos/outlook-folders.tcl | 3 | ||||
-rw-r--r-- | demos/outlook-newgroup.tcl | 4 |
3 files changed, 7 insertions, 16 deletions
diff --git a/demos/layout.tcl b/demos/layout.tcl index 2e4f30e..4476650 100644 --- a/demos/layout.tcl +++ b/demos/layout.tcl @@ -31,14 +31,12 @@ proc DemoLayout {} { $T style layout $S e6 -detach yes -expand ws -padx {0 2} -pady {2 0} $T style layout $S e7 -detach yes -expand wn -padx {0 2} -pady {0 2} - set I [$T item create] - $T item hasbutton $I yes + set I [$T item create -button yes] $T item style set $I 0 $S $T item lastchild root $I set parent $I set I [$T item create] - $T item hasbutton $I no $T item style set $I 0 $S $T item lastchild $parent $I @@ -50,13 +48,11 @@ proc DemoLayout {} { $T style layout $S e3 -union e1 -ipadx {20 4} -ipady {4 12} $T style layout $S e4 -detach yes -iexpand es - set I [$T item create] - $T item hasbutton $I yes + set I [$T item create -button yes] $T item style set $I 0 $S $T item lastchild root $I set I2 [$T item create] - $T item hasbutton $I2 no $T item style set $I2 0 $S $T item lastchild $I $I2 @@ -68,13 +64,11 @@ proc DemoLayout {} { $T style layout $S e3 -union {e1 e5} -ipadx 4 -ipady 4 $T style layout $S e5 -ipady {0 20} - set I [$T item create] - $T item hasbutton $I yes + set I [$T item create -button yes] $T item style set $I 0 $S $T item lastchild root $I set I2 [$T item create] - $T item hasbutton $I2 no $T item style set $I2 0 $S $T item lastchild $I $I2 @@ -91,15 +85,13 @@ proc DemoLayout {} { $T style layout $S eb -union et -ipadx 2 -ipady 2 $T style layout $S et -squeeze x - set I [$T item create] - $T item hasbutton $I yes + set I [$T item create -button yes] $T item style set $I 0 $S $T item text $I 0 $text $T item lastchild root $I set parent $I set I [$T item create] - $T item hasbutton $I no $T item style set $I 0 $S $T item text $I 0 $text $T item lastchild $parent $I diff --git a/demos/outlook-folders.tcl b/demos/outlook-folders.tcl index 6b7cafc..7fceacc 100644 --- a/demos/outlook-folders.tcl +++ b/demos/outlook-folders.tcl @@ -77,8 +77,7 @@ proc DemoOutlookFolders {} { 0 server "news.gmane.org" yes 0 1 group "gmane.comp.lang.lua.general" no 498 } { - set item [$T item create] - $T item hasbutton $item $button + set item [$T item create -button $button] if {[string equal $img folder]} { if {$unread} { $T item style set $item 0 s4 diff --git a/demos/outlook-newgroup.tcl b/demos/outlook-newgroup.tcl index 4cf52c0..54c0b39 100644 --- a/demos/outlook-newgroup.tcl +++ b/demos/outlook-newgroup.tcl @@ -116,7 +116,7 @@ proc DemoOutlookNewsgroup {} { } if {[$T item numchildren $i]} { - $T item hasbutton $i yes + $T item configure $i -button yes # Collapse some messages if {rand() * 2 > 1} { @@ -299,7 +299,7 @@ proc DemoOutlookNewsgroup2 {} { $T item style set $i 3 $style 4 $style2.we 5 $style2.we 6 $style2.w $T item text $i 3 $subject 4 $from 5 $sent 6 $size if {[$T item numchildren $i]} { - $T item hasbutton $i yes + $T item configure $i -button yes } } |