Hey there, I am working on a chat app, looking for...
# tornadofx
s
Hey there, I am working on a chat app, looking for a way to hide empty rows in listview so that if I have only 2 items in a list I see only those and not empty smartcells. Please help. Thanks.
s
I had a very similar problem. The only solution I found was to just not put the items into the listview.
(Have the logic controller "hide" the items instead of having the view do it.)
s
hmm but that would add unnecessary scrolling if you have less items.
s
Oh, I misunderstood your question.
Ignore everything I said.
You want the listview to shrink vertically so there are no empty rows?
s
yes, exactly or simply put, I want the listview to be as tall as number of items in it.
c
If there's a small enough number of items in it to all fit on screen at once, why not just use a vbox?
s
Numbers of items is unknown. It can be 0 to any number.