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.

有帮助吗?

解决方案

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).

其他提示

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top