Question

I want to add large string content to a container dynamically. There are 60 different contents(strings) to be displayed in this container.

To add the string to container, I am adding a TextArea(empty border with 100% transparency).

The problem is that TextArea offers scroll and I do not want it to scroll. Instead I want to grow(increase height) according to content. I am unable to achieve this.

Can you help me out with this? Or can I use any other component for the purpose?

I am using LWUIT with J2ME.

Was it helpful?

Solution

You can derive text area and return false for isScrollableY() although it should generally work seamlessly even if you don't do that (since your parent layout is scrollable). Is it possible you changed the text area and don't revalidate the parent form on the EDT?

There are problems with text area layout when it is modified by a separate thread (race condition with the layout code).

OTHER TIPS

First put the TextArea.setSingleLineTextArea(false) , and grow by content true.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top