Why `checkbox` in `treeview` loses its check state...
# tornadofx
e
Why
checkbox
in
treeview
loses its check state when an items gets expanded/collapsed? I added checkbox like this
Copy code
treeview {
  ...
  graphic { checkbox {} }
}
r
The graphic for the row get regenerated upon cell draw (
TreeView
uses a virtual flow to try to optimize memory/rendering). In order for your checkbox to maintain state, you need to include that state in whatever is the generic type of your tree view, then make sure to set the checkbox value appropriately on update.