Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re: Line size in a text widget

by witandhumor (Pilgrim)
on Mar 10, 2004 at 04:46 UTC ( [id://335349]=note: print w/replies, xml ) Need Help??


in reply to Re: Line size in a text widget
in thread Line size in a text widget

I should have clarified...sorry about that. This is a text box where the text wraps to the next line at 30 characters.

Replies are listed 'Best First'.
Re: Re: Re: Line size in a text widget
by chanio (Priest) on Mar 10, 2004 at 14:41 UTC
    not tested, just an idea...
    use Text::Autoformat; my ($allTheText) = shift; ## all your text to format my (@lins); ## your resulting lines my ($widthTxt) = 30; ## your line width... { my ($formated)=autoformat($allTheText, { left=>5, right=>$widthTxt +, all=>1}) if ($allTheText); foreach (split(/\n+/,$formated)) { push(@lins,$_); ## array w/lines of max.30chrs.wth. } }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-19 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found