Reputation: 3587
I have following situation: VerticalLayout with Labels inside it. (this layout is interrior of popup)
When I'm building the application I don't know lengths of the labels - the label contents are queried from database.
Is there any way to tell this VerticalLayout to have width enough to fit all labels without breaking them, but not bigger? I don't want labels to break, but I also don't want to have empty space in the popup.
Upvotes: 0
Views: 8598
Reputation: 3155
By default, Vaadin labels have a width of 100%. You'll want to change that to "undefined", and the same for the VerticalLayout : In both cases setWidth(null)
or setWidth(-1, UNIT_PIXELS)
Upvotes: 5