Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

ozboomer's scratchpad

by ozboomer (Pilgrim)
on Feb 16, 2006 at 00:16 UTC ( #530567=scratchpad: print w/replies, xml ) Need Help??

My weekly QuickQuestion(tm)... I'm going gaga on a simple Perl/Tk operation ( see my scratchpad ) When -width is specified, why is the text label contents always centred? - justify is documented to only work with multi-line contents. How can the contents of a fixed-width text label be left-justified?
use strict; use Tk; my $mw = MainWindow->new; my $lbl = $mw->Label( # File -text => '(start)', # -width => 12, -background => 'bisque', # -justify => 'left', -relief => 'groove', )->pack; my $btn = $mw->Button( -text => "Go!", -command => \&test, )->pack; MainLoop; sub test { $lbl->configure(-text => 'A'); }
this node xml test Aug 19, 2009 at 01:35 UTC
Log In?

What's my password?
Create A New User
LanX "♪..♫ Last night a DJ killed my wife ♪..♫ "
zentara...oO 1 more reason I prefer Perl to Python is I can't believe how long Python takes to compile, and you can't disable the myriad of tests
[LanX]: so that's where you've been the last two years? Compiling Python?
[zentara]: LanX no! I was learning why Krishna made me into a unicorn. :-)

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2017-03-30 16:47 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (361 votes). Check out past polls.