B4J Question TextArea automatic resize in ListView

Otto Tentacle

New Member
Hi I'm tinkering with B4J to see what it can do. As one of my little projects I was trying out different ways of showing data in a ListView. I've tried two variants of the same idea - one using an AnchorPane with a Label to show data and one using an AnchorPane with a TextArea to show data. When using a Label it is possible set the height property in AddNode to 0 or -1 and the Label for each row will autosize based on the contents. However, when using a TextArea this doesn't work - each row is the same size and much too big for the contained data. I've attached a file to show this behavior.

Have I done something wrong or is this normal?

Using a TextArea is more useful than a Label so is there some other way to make this work?

Thanks
 

Attachments

  • ListView.zip
    2.4 KB · Views: 289

Erel

B4X founder
Staff member
Licensed User
Longtime User
SS-2016-03-14_09.31.31.png


Check the attached example. Note that the Handle Resize Event option is unchecked in the ItemLayout layout.
 

Attachments

  • ListViewWithText.zip
    3.3 KB · Views: 344
Upvote 1
Top