Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 pondering the Monastery: (9)
As of 2014-09-02 08:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (20 votes), past polls