Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Justify text Tcl::Tk

by dbuckhal (Friar)
on Mar 10, 2016 at 16:18 UTC ( #1157313=note: print w/replies, xml ) Need Help??


in reply to Justify text Tcl::Tk

How about thinking outside the "Tk box" and pre-format your text before you assign it to the text attribute:
$ perl -le ' $left = sprintf( ">>%-10s<<", "left" ); $right = sprintf( ">>%10s<<", "right" ); print "$left\n"; print "$right\n"; ' __output__ >>left << >> right<<
Hope it helps!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1157313]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2018-07-19 15:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (411 votes). Check out past polls.

    Notices?