CodeQrius
CodeQrius

Reputation: 429

Resizing HBox width to fit content

I have an HBox with a fixed Width and Height and a Border. In that HBox I have a viewStack with a few different views. When the viewStack changes views, I want the HBox container to keep resizing to its content. Currently it stays at the fixed width. Is there any way to do that with an HBox setting?

Upvotes: 1

Views: 2632

Answers (2)

Sean Clark Hess
Sean Clark Hess

Reputation: 16079

You have to remove all sizing on the HBox. So remove any width or percentWidth attributes. Also make sure your ViewStack is resizing first.

Upvotes: 1

bedwyr
bedwyr

Reputation: 5904

I've not done this myself, but here are a few links which might be helpful:

Upvotes: 0

Related Questions