diff options
author | treectrl <treectrl> | 2006-11-23 22:24:56 (GMT) |
---|---|---|
committer | treectrl <treectrl> | 2006-11-23 22:24:56 (GMT) |
commit | ba58be95010e7a8fef177ea8f96c408371f7d82d (patch) | |
tree | 0502a17ce9ecc1e154bb7f01b0406e3a590efa99 /demos/biglist.tcl | |
parent | 0a730735d7727e045df33ef8be54ca434aa81143 (diff) | |
download | tktreectrl-ba58be95010e7a8fef177ea8f96c408371f7d82d.zip tktreectrl-ba58be95010e7a8fef177ea8f96c408371f7d82d.tar.gz tktreectrl-ba58be95010e7a8fef177ea8f96c408371f7d82d.tar.bz2 |
Added [DemoList] command to get the name of the main list rather than hard-coding .f2.f1.t everywhere.
Diffstat (limited to 'demos/biglist.tcl')
-rw-r--r-- | demos/biglist.tcl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/demos/biglist.tcl b/demos/biglist.tcl index de01e05..2353ec0 100644 --- a/demos/biglist.tcl +++ b/demos/biglist.tcl @@ -1,11 +1,11 @@ -# RCS: @(#) $Id: biglist.tcl,v 1.10 2006/11/13 04:45:09 treectrl Exp $ +# RCS: @(#) $Id: biglist.tcl,v 1.11 2006/11/23 22:24:56 treectrl Exp $ set ::clip 1 proc DemoBigList {} { global BigList - set T .f2.f1.t + set T [DemoList] # # Configure the treectrl widget @@ -129,9 +129,9 @@ if {$::clip} { BigListGetWindowHeight $T if {$::tile} { bind DemoBigList <<ThemeChanged>> { - BigListGetWindowHeight .f2.f1.t - if {[.f2.f1.t item id {first visible tag info}] ne ""} { - .f2.f1.t item conf {tag info} -height $BigList(windowHeight) + BigListGetWindowHeight [DemoList] + if {[[DemoList] item id {first visible tag info}] ne ""} { + [DemoList] item conf {tag info} -height $BigList(windowHeight) } } } @@ -153,9 +153,9 @@ if {$::clip} { } bind DemoBigListChildWindow <Motion> { - set x [expr {%X - [winfo rootx .f2.f1.t]}] - set y [expr {%Y - [winfo rooty .f2.f1.t]}] - BigListMotion .f2.f1.t $x $y + set x [expr {%X - [winfo rootx [DemoList]]}] + set y [expr {%Y - [winfo rooty [DemoList]]}] + BigListMotion [DemoList] $x $y } bindtags $T [list $T DemoBigList TreeCtrl [winfo toplevel $T] all] |