Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Tk - aligning Labels

by Khen1950fx (Canon)
on Sep 13, 2012 at 17:45 UTC ( #993542=note: print w/ replies, xml ) Need Help??


in reply to Tk - aligning Labels

I used windowCreate:

#!/usr/bin/perl use strict; use warnings; use Tk; my $btypes; my $locations; my $bstats; my $mw = MainWindow->new; $mw->geometry("400x300"); $mw->title("First App"); my $f = $mw->Frame->pack(-side => 'bottom'); $f->Button( -text => "Exit", -command => sub { exit; } )->pack(-side => 'left'); my $t = $mw->Scrolled("Text", -width => 50, -wrap => 'none' )->pack(-expand => 1, -fill => 'both'); foreach (qw/Locations Types/) { $mw = $t->Label( -text => "$_:", -relief => 'groove', -width => 30, ); $t->windowCreate('end', -window => $mw); $mw = $t->Entry( -width => 20, -textvariable => \$locations, ); $t->windowCreate('end', -window => $mw); $t->insert('end', "\n"); }; $t->configure(-state => 'enabled'); MainLoop;


Comment on Re: Tk - aligning Labels
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://993542]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (11)
As of 2015-07-06 06:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls