[Israel.pm] Tk Layout maddness

Felix Liberman felix.liberman at gmail.com
Fri Nov 3 09:53:20 PST 2006


Besides mentioned here manual, I'll recommend to play with interactive
code generators like ZooZ or VPTK_W (both available on CPAN).

The advantage of such tool is that you can solve all geometry-related
issues without re-running your program 1001 times.

BTW, in addition to -anchor you've to use -expand=>1 in order to
stretch your frame horizontally.



On 11/3/06, perl-request at perl.org.il <perl-request at perl.org.il> wrote:
> Date: Thu, 02 Nov 2006 22:51:29 +0200
> From: Shmuel Fomberg <semuelf at 012.net.il>
> Subject: [Israel.pm] Tk Layout maddness
> To: perl at perl.org.il
> Message-ID: <000001c6fec0$acbed000$6500a8c0 at semuel7>
> Content-Type: text/plain; charset=us-ascii
> Hello There.
> I was given a task to write a GUI for a program, so I decided to learn
> and do it the Tk way.
> Quite nice, actually. I have only one problem, and this is the layout
> placers.
> Does anyone know an in-depth explanation on the net?
> The problem that I stucked with: I have a frame that have two labels
> inside: on the left and on the right.
> The frame itself is inside a bigger frame, and it insist on being in the
> center.
> Now, I don't want to declare it "left", because I add other widgets
> below it.
> In short, I want my frame to stretch horizontally, (and I already tried
> -fill='x')
> So my inner widgets will arrive to their proper places.
> Help?
> Shmuel.

More information about the Perl mailing list