Question, is it possible to tell a treeview to gro...
# tornadofx
s
Question, is it possible to tell a treeview to group its virgin items(items with no children) into say, a flow pane containing all of them, instead of a single item for each row? For example in the following picture items "1-1-1" and "1-1-2" would not take up two rows, but be contained within a single flow pane. The same would apply for "1-3, 1-4, 1-5, 1-6" as well as "2, 3, 4, 5".
r
You would have to group then manually and make the appropriate cell factory. Also, they're usually called leaf nodes or leaves. I've never heard them called virgin, though it does make sense 🙂
m
Yeah, you'll need to group your virgins....and keep an eye on them so they don't get pregnant 😂
couldn't resist dad joke opportunity
s
ha! maybe I shouldn't have asked the question after 3 beers and a glass of wine xd I knew there was some nomenclature I was missing! I've used cellFormat, childFactories and ItemFactories while playing with treeviews but I haven't yet ever looked into overriding the cellFactory. I'll give it a go tomorrow when I'm sober!
🍻 2