O Otto Tentacle New Member Mar 13, 2016 #1 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 ListView.zip 2.4 KB · Views: 512
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
Erel B4X founder Staff member Licensed User Longtime User Mar 14, 2016 #2 Check the attached example. Note that the Handle Resize Event option is unchecked in the ItemLayout layout. Attachments ListViewWithText.zip ListViewWithText.zip 3.3 KB · Views: 575 Upvote 1
Check the attached example. Note that the Handle Resize Event option is unchecked in the ItemLayout layout.
O Otto Tentacle New Member Mar 14, 2016 #3 Solved, thanks, although I think it will take me a while to work out how the solution works. Is there any documentation/examples you can recommend? Upvote 0
Solved, thanks, although I think it will take me a while to work out how the solution works. Is there any documentation/examples you can recommend?
Erel B4X founder Staff member Licensed User Longtime User Mar 15, 2016 #4 You can start with the video tutorials: https://www.b4x.com/b4j.html Upvote 0