in reply to Content of Perl/Tk Fixed-Width Text Label is Always Centred!?
#!/usr/bin/perl use warnings; use strict; use Tk; my $mw = MainWindow->new; my $lbl = $mw->Label( # File -text => '(start)', -width => 12, -background => 'bisque', -justify => 'left', -anchor =>'w', -relief => 'groove', )->pack; my $btn = $mw->Button( -text => "Go!", -command => \&test, )->pack; MainLoop; sub test { $lbl->configure(-text => 'A'); }
|
|---|