I have a VBox
which looks like this:
ImportantWidget
HSeparator
Label
I want this window to be only as wide as ImportantWidget
needs to be, and no wider. However, the Label
can sometimes grow to be very long. I want the following logic: if Label
can fit all its text without expanding the VBox
horizontally (after it has grown enough to fit ImportantWidget
), then its text should all be on one line. But if it would overflow and cause horizontal resizing, then it should instead split its text across multiple lines.
Is there a widget that does this already, that's better than Label
for the task? If not, what should I use?