From dea40b9b862fad5ebe4bc636ecf4de2ae52b5700 Mon Sep 17 00:00:00 2001 From: treectrl Date: Sun, 5 Nov 2006 06:48:34 +0000 Subject: Replaced use of deprecated treectrl option -defaultstyle with new column option -itemstyle. Set the size of window element box in the canvas to the [winfo width] instead of [winfo reqwidth] to support the -clip option (since the borderless frame usually has zero requested size). --- demos/style-editor.tcl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/demos/style-editor.tcl b/demos/style-editor.tcl index 9336df1..54ddea0 100644 --- a/demos/style-editor.tcl +++ b/demos/style-editor.tcl @@ -1,4 +1,4 @@ -# RCS: @(#) $Id: style-editor.tcl,v 1.9 2006/10/28 01:24:13 treectrl Exp $ +# RCS: @(#) $Id: style-editor.tcl,v 1.10 2006/11/05 06:48:34 treectrl Exp $ namespace eval StyleEditor { variable Info @@ -142,7 +142,7 @@ proc StyleEditor::SetListOfStyles {} { $T style elements s1 {e2 e1} $T style layout s1 e2 -union [list e1] -ipadx 2 -ipady 2 -iexpand e - $T configure -defaultstyle s1 + $T column configure C0 -itemstyle s1 } # Clear the list @@ -200,7 +200,7 @@ proc StyleEditor::SetListOfElements {style} { $T style elements s1 {e2 e1} $T style layout s1 e2 -union [list e1] -ipadx 2 -ipady 2 -iexpand e - $T configure -defaultstyle s1 + $T column configure C0 -itemstyle s1 } # Clear the list @@ -296,7 +296,7 @@ proc StyleEditor::SetPropertyList {} { $T configure -font [[Info editor,pad].v1 cget -font] \ -minitemheight $height - $T configure -defaultstyle s1 + $T column configure 0 -itemstyle s1 } $T item delete all @@ -748,8 +748,8 @@ proc StyleEditor::StyleToCanvas {{scroll 0}} { } if {$sameAsMaster} { } elseif {$name eq "-window"} { - $T style layout $style $E -width [winfo reqwidth $current] \ - -height [winfo reqheight $current] + $T style layout $style $E -width [winfo width $current] \ + -height [winfo height $current] } else { $T element configure $E $name $current } -- cgit v0.12