At 04:45 PM 11/4/2005, you wrote:
Hi all!
Is there a way to dynamically set the height of the text area component
based on
the content?
What I would really like to 'capture' is the number of line returns and then
multiply that by the default "row" size of 22 to set the height.
Setting the component height to the length is mis-leading at best. Say the
length returns 180 characters...the component height would not be 180 px..you
must account for how many lines of text and that is where I am getting fuzy...
- Hope this makes sense...
--
Drue
Skyymap, Inc.
Drue,
Actually it's worse than that. You can't simply chop the line at "n"
characters, you have to drop back to the last space and work from there
when you are figuring out your line count. Then add in the returns or break
tags if it's HTML.
Don't know what you're experiencing, but for the past two years we've run
AllNovaScotia.com with the "standard" text area/scroll bar combo. All the
while there's been a low-level rumble of "We want to use mouse wheel,
PageUp and PageDown to move through the issue."
Finally, we got around to re-doing the site in MX 2004, using the Flash
TextArea component. Easy for me - built-in scrolling support, mouse wheel
and PgUp/PgDn.
Now they want "more" and "back" buttons positioned just below the text if
there is more text than will fill the available space. Auuugh!! I've been
trying to explain they don't need that - they have the scrolling features
they wanted. I can calculate depths, count returns, line lengths, etc. all
I want. As soon as a picture or two goes in the story that's a broken
formula. Feels like they want me to write a primitive PageMaker in Flash!
It's sort of the inverse of your challenge, and I've not really put my mind
to it yet, as I'm fixing a combo box change handler MM broke in moving to
MX 2004. Listeners ... broadcasters ... registration ... mutter, mutter.
Cheers, and have a great weekend - Miles
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders