Is there any way to align text of elements to center inside a ListView in javafx?
I haven't found a method that does this.
You could use a css stylesheet to set the style alignment of ListCell
s of a ListView
. E.g. if the id lv
is assigned to the ListView
:
#lv .list-cell {
-fx-alignment: center;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With