Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Line size in a text widget

by Daruma (Curate)
on Mar 10, 2004 at 04:43 UTC ( #335347=note: print w/ replies, xml ) Need Help??


in reply to Line size in a text widget

Greetings, witandhumor!

I'm having a hard time visualizing what you are trying to do here.

Is this to be a text box where the text wraps to the next line at 30 characters?

or

Is this to be a text box that limits the information to 30 characters?

Daruma


Comment on Re: Line size in a text widget
Re: Re: Line size in a text widget
by witandhumor (Pilgrim) on Mar 10, 2004 at 04:46 UTC
    I should have clarified...sorry about that. This is a text box where the text wraps to the next line at 30 characters.
      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
Node Status?
node history
Node Type: note [id://335347]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2014-12-26 07:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (168 votes), past polls