Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

packing question

36 views
Skip to first unread message

Mark Tarver

unread,
Feb 2, 2024, 4:06:13 AMFeb 2
to
I've packed some buttons pack .b1 .b2 -side left.
A bit later I want to pack .b3 and .b4 also from left to right
but below .b3 and .b4. I don't want to use grid.
But pack .b3 .b4 - side left packs in a single row.
How do I get a 'new line' in there?

Mark

Ralf Fassel

unread,
Feb 2, 2024, 4:25:20 AMFeb 2
to
* Mark Tarver <dr.mt...@gmail.com>
Using grid would be the simplest way, but if you don't want to use grid,
you need to use "helper frames":

---frame1--------
button1 | button2
-----------------
---frame2--------
button3 | button4
-----------------

pack [frame .f1] -side top -fill both -expand yes
pack [button .f1.b1 -text F1B1] -side left -fill both -expand yes
pack [button .f1.b2 -text F1B2] -side left -fill both -expand yes

pack [frame .f2] -side top -fill both -expand yes
pack [button .f2.b3 -text F2B3] -side left -fill both -expand yes
pack [button .f2.b4 -text F2B4] -side left -fill both -expand yes

HTH
R'

Mark Tarver

unread,
Feb 2, 2024, 5:03:21 AMFeb 2
to
I thought that might be the case. My new question is in the next thread.

thx

Mark

Rich

unread,
Feb 2, 2024, 7:13:31 AMFeb 2
to
Mark Tarver <dr.mt...@gmail.com> wrote:
> A bit later I want to pack .b3 and .b4 also from left to right
> but below .b3 and .b4. I don't want to use grid.

Might I ask why you don't want to use grid. It (grid) is often the
easiest way to achieve most widget layouts one wants to produce.

Mark Tarver

unread,
Feb 2, 2024, 7:31:15 AMFeb 2
to
See my last post to my most recent thread. It wasn't working, but
not because I got the grid command wrong but because of a background
process that had not died. Now my stuff gets through.


Mark
0 new messages