summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authortreectrl <treectrl>2005-05-27 20:03:34 (GMT)
committertreectrl <treectrl>2005-05-27 20:03:34 (GMT)
commit28acece888967f7a375694dcdf35787448d6c5e2 (patch)
tree02810e7e07af3be623c6b4a39a3b4a7d92f04c64 /library
parent70355c9620a52da78e705ae88270defbd1a6fe0e (diff)
downloadtktreectrl-28acece888967f7a375694dcdf35787448d6c5e2.zip
tktreectrl-28acece888967f7a375694dcdf35787448d6c5e2.tar.gz
tktreectrl-28acece888967f7a375694dcdf35787448d6c5e2.tar.bz2
New option -columnresizemode.
Diffstat (limited to 'library')
-rw-r--r--library/treectrl.tcl17
1 files changed, 13 insertions, 4 deletions
diff --git a/library/treectrl.tcl b/library/treectrl.tcl
index 1fa6964..725a1a0 100644
--- a/library/treectrl.tcl
+++ b/library/treectrl.tcl
@@ -456,10 +456,19 @@ proc ::TreeCtrl::Motion1 {w x y} {
if {$width == 0} {
incr width
}
- scan [$w column bbox $Priv(column)] "%d %d %d %d" x1 y1 x2 y2
- # Use "ne" because -columnproxy could be ""
- if {($x1 + $width - 1) ne [$w cget -columnproxy]} {
- $w configure -columnproxy [expr {$x1 + $width - 1}]
+ switch -- [$w cget -columnresizemode] {
+ proxy {
+ scan [$w column bbox $Priv(column)] "%d %d %d %d" x1 y1 x2 y2
+ # Use "ne" because -columnproxy could be ""
+ if {($x1 + $width - 1) ne [$w cget -columnproxy]} {
+ $w configure -columnproxy [expr {$x1 + $width - 1}]
+ }
+ }
+ realtime {
+ if {[$w column cget $Priv(column) -width] != $width} {
+ $w column configure $Priv(column) -width $width
+ }
+ }
}
}
}