Code Comments
Programming Forum and web based access to our favorite programming groups.I am having the following problem with tixPanedWindow: For some reason, I am not able to use multiple frames inside a pane, and have the pane work with the "correct" natural geometry. I can use one frame with non-container widgets on it, and that works fine. When I try to add a second frame, both are displayed, but the natural size is the one of the first frame. When I put the two frames into one bigger frame, the natural size seems to become zero. I can use the -size option to get the correct behaviour, but that doesn't work if I don't know the correct size of both frames in advance, for example if the user can change the fonts used in them. What's the correct way to do this? Or is it a bug in tixPanedWindow? Below is a stupid example program that demonstrates the problem. When you run it, the buttons are not visible by default; you have to enlarge the pane to be able to seem them. Thanks for any help. If it matters, I am using the Debian itesting packages tix8.1 (version 8.1.4-6), which in turn uses tcl8.4 (version 8.4.6-1). - Dirk ------------------------------ snip ------------------------------ set m [frame .main] set pp [tixPanedWindow $m.p -orientation vertical -dynamicgeometry true] set p [$pp add top -expand 0] set f [frame $p.f] label $f.l -text "Hallo" grid $f.l pack $f set p [$pp add bot -expand 0] # Uncomment this to put both frames into one big frame # set p [frame $p.p] # pack $p -fill both -expand yes set f [frame $p.f] label $f.l -text "Links" label $f.r -text "Rechts" text $f.t -height 4 -width 20 grid $f.l $f.r -sticky w grid $f.r -sticky e grid $f.t - -sticky nswe grid columnconfigure $f 1 -weight 1 grid rowconfigure $f 1 -weight 1 grid $f -sticky nswe set f [frame $p.b] button $f.1 -text "Knopf 1" button $f.2 -text "Knopf 2" grid $f.1 $f.2 -sticky we grid $f -sticky we $pp add filler -expand 1 pack $pp -fill both -expand yes pack $m -fill both -expand yes
Post Follow-up to this messageDirk Thierbach wrote: > I am having the following problem with tixPanedWindow: For some reason, .. > Thanks for any help. If it matters, I am using the Debian itesting package s > tix8.1 (version 8.1.4-6), which in turn uses tcl8.4 (version 8.4.6-1). If you are using Tcl/Tk 8.4, why don't you use the new core panedwindow widget in 8.4 instead of the Tix one? -- Jeff Hobbs, The Tcl Guy http://www.ActiveState.com/, a division of Sophos
Post Follow-up to this messageJeff Hobbs <jeffh@removethis.activestate.com> wrote: > If you are using Tcl/Tk 8.4, why don't you use the new core > panedwindow widget in 8.4 instead of the Tix one? Because I didn't know it was there -- it's been some time since I used Tcl/Tk last, and Debian just installed the newest package for me. Thanks, with panedwindow it works. So I guess it's a bug in tixPanedWindow. - Dirk
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.