Hi everyone, I have an ObservableList with items....
# tornadofx
t
Hi everyone, I have an ObservableList with items. I created a CheckBox for each item in the list using Fragment and the ListView. (basically the MVC-tutorial but simplified:

https://www.youtube.com/watch?v=DP863ceFT08

) The functionality works but I don't want to have a list but just a regular vbox. Is it possible to change the ListView to the VBox? What I basically need is a VBox with checkboxes with label based on a MutableList (names don't change) where I can get a list of checked items and a list with unchecked items in a idiomatic way (It's for my thesis...) I know VBox Has a bindChildren, but I don't know at this moment how to use that with the ListCellFragment. or if there is a similar Fragment that has startEdit and commitEdit
r
You would indeed use
bindChildren
, but not
ListCellFragment
. You would have to use a "normal"
Fragment
and manage editing etc. yourself. Editing as defined here is a concept in JavaFX for things with "cells" (e.g.
ListView
,
TableView
,
TreeView
, etc.). If that's the functionality you want, I'd personally recommend sticking with a
ListView
and styling it to look how you want.
t
Thx! I will look into styling, as I don't know much about styling (other than a bit of the internals in TornadoFX ;-))