Hans ([EMAIL PROTECTED]) wrote:
> Someone please enlighten me. I can't for the world figure out what is
> wrong here.
Your understanding of the packer is wrong :-)
> - I create a main window.
>
> - In this window I create a frame.
You don't need a frame that covers the whole window - except for design
reasons.
>
> - In this frame I create four buttons.
And that's your problem.
> - The buttons need to be packed like this:
>
> TOP
>
> LEFT RIGHT
>
> BOTTOM1 BOTTOM2
Ok, lets draw some lines around this, but beforehand let me explain how
the packer works.
If you create elements in your window and pack them with a '-side =>',
then a piece with the size of your element is cut off along the full
size of the remaining window space.
+---------------+ +---------------+
| | | New thing |
| | +---------------+
| | -> pack(-side=>'top') -> | |
| | | Remainder |
| | | |
| | | |
+---------------+ +---------------+
-> pack(-side => 'top'):
+---------------+
| New thing |
+---------------+
| |
| Remainder |
| |
| |
+---------------+
-> pack(-side => 'right'):
+---------------+
| Old thing |
+-----------+---+
| | N |
| Remainder | e |
| | w |
| | |
+-----------+---+
-> pack(-side => 'bottom'):
+---------------+
|very old thing |
+-----------+---+
| Remainder | O |
| | l |
+-----------+ d |
| New | |
+-----------+---+
Does this clear things up a bit?
So what you need to do is:
- create window
- create top button
- create 2nd floor frame
- put 2 buttons - side => 'left' into 2nd floor frame
- optionally create 3rd floor frame
If the remaining 2 buttons take up all the space that's left, this
step isn't needed
- put the last 2 buttons in either the remaining window space or the
3rd floor frame.
--
If we fail, we will lose the war.
Michael Lamertz | [EMAIL PROTECTED] / [EMAIL PROTECTED]
Nordstr. 49 | http://www.lamertz.net
50733 Cologne | Work: +49 221 3091-121
Germany | Priv: +49 221 445420 / +49 171 6900 310