Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 studying the Monastery: (6)
As of 2014-07-24 04:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (157 votes), past polls