PDA

View Full Version : finding the text of height of multiline text


ows
06-26-2003, 01:09 PM
This has come up a couple of times now. I'd like to size a text view to fit the number of lines of text that it contains. My declaration looks like this:

<text datapath="description/text()" multiline="true" height="50"/>

but if the text is only one or two lines, and fits in fewer than 50 pixels, then I'd like to make that text view smaller.

How can I do this?

antun
06-26-2003, 01:37 PM
Use the resizable attribute. It's not documented under <text> but it should be:


<text datapath="description/text()" multiline="true" width="100"
resizable="true" />


Just don't set the height of the text field.

-Antun