JavaFX Getting TreeView's prefWidth

306 views Asked by At

I've been trying to determine a TreeView's preferred width but all I get when I call getPrefWidth() is -1. Is there a reason for that? For me the preferred width would be the width of the widest cell. That value must be stored somewhere since scrollbars are displayed when the TreeView doesn't have enough space to show all of it's content.

0

There are 0 answers