Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Perl tk [ Tk::Text -justify option is not working

by ungalnanban (Pilgrim)
on Mar 01, 2010 at 07:22 UTC ( #825839=note: print w/ replies, xml ) Need Help??


in reply to Re: Perl tk [ Tk::Text -justify option is not working
in thread Perl tk [ Tk::Text -justify option is not working

Hi.. I used Text widget so I wrote my code like.

$align -> command(-label =>"Left",-command=>sub { #$txt->configure( -justify =>'left'); $txt->tagConfigure('left', -justify => 'left'); } ); $align -> command(-label =>"Right",-command=>sub { #$txt->configure(-justify=>'right'); $txt->tagConfigure('right', -justify => 'right'); } ); $align -> command(-label =>"Center",-command=>sub { #$txt->configure(-justify=>'center'); $txt->tagConfigure('center', -justify => 'center'); } );

but the text in the Text widget are not aligned to left,right or center.
How can I achieve the text alignment option in Text widget?


Comment on Re^2: Perl tk [ Tk::Text -justify option is not working
Download Code
Re^3: Perl tk [ Tk::Text -justify option is not working
by zentara (Archbishop) on Aug 02, 2010 at 17:48 UTC
    I don't see a running code example, but the Tk demo "widget" has a text example which shows centered tag usage.
    $t->tag(qw/configure center -justify center/);

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2015-07-04 16:35 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 (60 votes), past polls