TkTable Minsize
From: Andy Martin (martinal23_at_yahoo.com)
Date: 03/30/04
- Next message: Erik Leunissen: "Re: State of HTTP1.1 clients"
- Previous message: Peter N. Schweitzer: "UpdateStringProc should not be invoked for type statekey"
- Next in thread: Jeff Hobbs: "Re: TkTable Minsize"
- Reply: Jeff Hobbs: "Re: TkTable Minsize"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Mar 2004 08:30:09 -0800
Hi,
I was trying to figure out a way to give a column in my tktable a
minsize. I have an embedded window that I don't want the user to be
able to make any smaller than 550 pixels. Here is what I came up
with. I was just curious if there was a better way that I'm missing.
bind $emb_win <Configure> {
set wdth [$tbl width 1]
if {$wdth > -550 && $width < 0} {
$tbl configure -resizeborders none
$tble width 1 -550
set rr(trackmouse) true
set rr(mousex) [winfo pointerx $tbl]
}
}
bind $tbl <Motion> {
if {$rr(trackmouse)}
if {$rr(mousex) < [winfo pointerx $tbl]} {
$tbl configure -resizeborders col
set rr(trackmouse) false
}
}
}
bind $tbl <ButtonRelease-1> {
$tbl configure -resizeborders col
set rr(trackmouse) false
}
Thanks!
Andy
- Next message: Erik Leunissen: "Re: State of HTTP1.1 clients"
- Previous message: Peter N. Schweitzer: "UpdateStringProc should not be invoked for type statekey"
- Next in thread: Jeff Hobbs: "Re: TkTable Minsize"
- Reply: Jeff Hobbs: "Re: TkTable Minsize"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]