B4J Question TextArea automatic resize in ListView

Discussion in 'B4J Questions' started by Otto Tentacle, Mar 13, 2016.

  1. Otto Tentacle

    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
     

    Attached Files:

  2. Erel

    Erel Administrator Staff Member Licensed User

    [​IMG]

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

    Attached Files:

  3. Otto Tentacle

    Otto Tentacle New Member

    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?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice