2

I'm working on a Perl/Tk GUI. It will have three main areas. Two of them side by side on top and then another one below the two.

I could just use grid geometry management. The upper two would have a row weight of 2. The lower one would have a weight of 1.

This would be good for the starting position, but the user needs the ability to adjust the sizes.

Looking at the Tk documentation, PanedWindows can also have a weight, but I can't figure out how to access it.

As I have it now, with my Paned frames, the upper and left children are minimum size, everthing else fills the area below and to the right. If I adjust the main window. only the lower and right windows are resize. Worst of all, I can resize the window and make some of the children disappear.

I want to maintain the current relative sizes.

How do I do this? I'm not tied to paned, grid, pack. Whatever works.

2
  • We've struggled with this one quite a bit, and have a solution that works for 2 panes, but as soon as you have a third pane, everything goes haywire. Will be interested to know of a solution. Might help to know your Tk version. Ours is 8.4. Apr 7, 2011 at 5:45
  • @TreyJackson: can you share your solution with 2 panes? i suffer from a similar problem and can't seem to find a solution... thanks
    – NirMH
    May 26, 2016 at 7:59

1 Answer 1

-1

Sounds like you are using frames in Tk. While I have never used Perl/Tk, I am kind of savy html which Tk is probably based on html. So, you might want to look into frames and framesets at Frames in HTML documents on the W3C site.

It sounds like you need 1 frameset with 2 frames for the top and another frame for the bottom.

I hope that this helps.

1
  • While your efforts to help are appreciated, HTML isn't at all relevant here. Apr 10, 2011 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.