DeLoreanDriver
DeLoreanDriver

Reputation: 205

JavaFX Getting TreeView's prefWidth

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.

Upvotes: 1

Views: 318

Answers (0)

Related Questions