diff options
author | treectrl <treectrl> | 2006-12-07 03:47:42 (GMT) |
---|---|---|
committer | treectrl <treectrl> | 2006-12-07 03:47:42 (GMT) |
commit | 9eab9c67a66a02022ba2d4a4a36f1cfb53902b7b (patch) | |
tree | 91581dfa9253187b726bcf785db7ed70efbc9430 /demos/explorer.tcl | |
parent | 68604c0aecb5a887195029f64f4b919374c25af6 (diff) | |
download | tktreectrl-9eab9c67a66a02022ba2d4a4a36f1cfb53902b7b.zip tktreectrl-9eab9c67a66a02022ba2d4a4a36f1cfb53902b7b.tar.gz tktreectrl-9eab9c67a66a02022ba2d4a4a36f1cfb53902b7b.tar.bz2 |
Use the new style layout option -draw instead of the deprecated element option of the same name.
Diffstat (limited to 'demos/explorer.tcl')
-rw-r--r-- | demos/explorer.tcl | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/demos/explorer.tcl b/demos/explorer.tcl index 45de1c8..6f1d166 100644 --- a/demos/explorer.tcl +++ b/demos/explorer.tcl @@ -1,4 +1,4 @@ -# RCS: @(#) $Id: explorer.tcl,v 1.24 2006/11/30 02:41:38 treectrl Exp $ +# RCS: @(#) $Id: explorer.tcl,v 1.25 2006/12/07 03:52:40 treectrl Exp $ set Dir [file dirname [file dirname [info script]]] @@ -166,14 +166,17 @@ proc DemoExplorerDetails {} { } # During editing, hide the text and selection-rectangle elements. + $T state define edit + $T style layout styName txtName -draw {no edit} + $T style layout styName elemRectSel -draw {no edit} $T notify bind $T <Edit-begin> { - %T item element configure %I %C txtName -draw no + elemRectSel -draw no + %T item state set %I ~edit } $T notify bind $T <Edit-accept> { %T item element configure %I %C %E -text %t } $T notify bind $T <Edit-end> { - %T item element configure %I %C txtName -draw yes + elemRectSel -draw yes + %T item state set %I ~edit } # @@ -362,8 +365,8 @@ proc DemoExplorerLargeIcons {} { # During editing, hide the text and selection-rectangle elements. $T state define edit - $T element configure elemTxt -draw {no edit} - $T element configure elemSel -draw {no edit} + $T style layout STYLE elemTxt -draw {no edit} + $T style layout STYLE elemSel -draw {no edit} $T notify bind $T <Edit-begin> { %T item state set %I ~edit } @@ -519,14 +522,17 @@ proc DemoExplorerList {} { } # During editing, hide the text and selection-rectangle elements. + $T state define edit + $T style layout STYLE elemTxt -draw {no edit} + $T style layout STYLE elemSel -draw {no edit} $T notify bind $T <Edit-begin> { - %T item element configure %I %C elemSel -draw no + elemTxt -draw no + %T item state set %I ~edit } $T notify bind $T <Edit-accept> { %T item element configure %I %C %E -text %t } $T notify bind $T <Edit-end> { - %T item element configure %I %C elemSel -draw yes + elemTxt -draw yes + %T item state set %I ~edit } # |