summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authortreectrl <treectrl>2006-11-15 23:48:48 (GMT)
committertreectrl <treectrl>2006-11-15 23:48:48 (GMT)
commit7998dc5a88aa9989bf5238fef760d86c76c1b444 (patch)
tree9a5950d9dda88dca001d76fc28a6cc4ba3566405 /demos
parent414b61724dbf8b60c8820959363478c8895ff08f (diff)
downloadtktreectrl-7998dc5a88aa9989bf5238fef760d86c76c1b444.zip
tktreectrl-7998dc5a88aa9989bf5238fef760d86c76c1b444.tar.gz
tktreectrl-7998dc5a88aa9989bf5238fef760d86c76c1b444.tar.bz2
Make sure the demo runs when -itemprefix and/or -columnprefix are specified.
Diffstat (limited to 'demos')
-rw-r--r--demos/column-lock.tcl18
-rw-r--r--demos/mycomputer.tcl6
2 files changed, 12 insertions, 12 deletions
diff --git a/demos/column-lock.tcl b/demos/column-lock.tcl
index dc78a52..1064ca9 100644
--- a/demos/column-lock.tcl
+++ b/demos/column-lock.tcl
@@ -1,4 +1,4 @@
-# RCS: @(#) $Id: column-lock.tcl,v 1.5 2006/11/05 06:50:34 treectrl Exp $
+# RCS: @(#) $Id: column-lock.tcl,v 1.6 2006/11/15 23:48:48 treectrl Exp $
proc DemoColumnLock {} {
@@ -128,10 +128,10 @@ proc DemoColumnLock {} {
$T style layout labelR4 labelR4.rect -detach yes -iexpand xy
$T style layout labelR4 labelR4.img -expand news -padx 2 -pady 2
- $T item style set {range 1 10} last labelR1
- $T item style set {range 11 20} last labelR2
- $T item style set {range 21 30} last labelR3
- $T item style set {range 31 40} last labelR4
+ $T item style set {range R1 R10} last labelR1
+ $T item style set {range R11 R20} last labelR2
+ $T item style set {range R21 R30} last labelR3
+ $T item style set {range R31 R40} last labelR4
#
# Create styles for the non-locked columns
@@ -167,18 +167,18 @@ proc DemoColumnLock {} {
$T style layout windowStyle windowStyle.text -expand we -padx 2 -pady 2
$T style layout windowStyle windowStyle.window -iexpand x -padx 2 -pady {0 2}
- $T item style set "list {2 22}" "all lock none" windowStyle
+ $T item style set "list {R2 R22}" "all lock none" windowStyle
foreach C [$T column id "lock none !tail"] {
- set ::DemoColumnLock(C$C) "C$C"
+ set ::DemoColumnLock(C$C) [$T column cget $C -tags]
- set I 2
+ set I R2
set clip [frame $T.clipR${I}C$C -borderwidth 0]
$::entryCmd $clip.e -width 4 -textvariable ::DemoColumnLock(C$C)
$T item element configure $I $C windowStyle.window -window $clip + \
windowStyle.text -textvariable ::DemoColumnLock(C$C)
- set I 22
+ set I R22
set clip [frame $T.clipR${I}C$C -borderwidth 0]
$::entryCmd $clip.e -width 4 -textvariable ::DemoColumnLock(C$C)
$T item element configure $I $C windowStyle.window -window $clip + \
diff --git a/demos/mycomputer.tcl b/demos/mycomputer.tcl
index b2de18d..19543b6 100644
--- a/demos/mycomputer.tcl
+++ b/demos/mycomputer.tcl
@@ -1,4 +1,4 @@
-# RCS: @(#) $Id: mycomputer.tcl,v 1.3 2006/10/28 01:26:03 treectrl Exp $
+# RCS: @(#) $Id: mycomputer.tcl,v 1.4 2006/11/15 23:50:28 treectrl Exp $
proc DemoMyComputer {} {
@@ -93,8 +93,8 @@ proc DemoMyComputer {} {
} {
set I [$T item create]
if {$type eq ""} {
- $T item style set $I 0 styHeader
- $T item span $I 0 5
+ $T item style set $I first styHeader
+ $T item span $I first [$T column count]
# The headers are disabled so they can't be selected and
# keyboard navigation skips over them.
$T item enabled $I false