Tornadofx: Maybe non-compliant opening tree views elements.

Created on 18 Dec 2018  路  8Comments  路  Source: edvin/tornadofx

When i clicking fast (i.e double click), my treeview item open good and successfully.
When i click not fast (i.e one click), my treeview item not opened, and it no good i think.

If i not true think, can you add bool property "openedOnClick". Thanks!
treeviewmaybeissue

Question

Most helpful comment

Looks like the JFXtras JMetro dark theme. Is that right?

All 8 comments

This is the behavior of the JavaFX TreeView: Double click expands or collapses, single click does nothing, expect when you click on the icon - then it only requires a single click to expand/collapse.

If you want to change this behavior you can add a mouse event handler to the treeview, like this:

setOnMouseClicked {
    with (selectionModel.selectedItem) {
        isExpanded = !isExpanded
    }
}

Thanks @edvin ! Good solution, you can mark it issue as question 馃憤

And one more question: How i can get "IsHeaderItem" or "IsExpandableItem"?

TreeView has an isLeaf() function and a corresponding isLeafProperty :)

thanks @edvin ! Good Job! You can close the issue.

Great! Are you using a theme for your app or did you write the CSS from scratch yourself? Looks nice :)

Looks like the JFXtras JMetro dark theme. Is that right?

@edvin no, it JFXtras JMetro dark theme, but with my edits.

If you like design my application, see more in https://github.com/MairwunNx/SacredMagician :)
I will be very happy if you appreciate the design and repository :)

https://github.com/JFXtras/jfxtras-styles/issues/22

@ruckustboom yes :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlbRoehm picture AlbRoehm  路  3Comments

pavan-p picture pavan-p  路  3Comments

Bastercall picture Bastercall  路  3Comments

MairwunNx picture MairwunNx  路  3Comments

arslancharyev31 picture arslancharyev31  路  7Comments