Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

How to place label of component horizontally in GridLayout?

Andy A
6 years ago Jul 16, 2015 3:18am
Michael Tzukanov
6 years ago Jul 20, 2015 11:12am
Andy A
6 years ago Jul 21, 2015 3:43am
Michael Tzukanov
6 years ago Jul 21, 2015 5:57am
Marius Reinwald
6 years ago Jul 21, 2015 6:25am

FYI In the new maven example archetype they use a ValoTheme Style that positions the Caption of a Textfield to the left of the Component. You can see that on the Login Screen:
https://vaadin.com/blog/-/blogs/vaadin-7-3-7-and-new-maven-archetypes

Edit: After i looked at it again now it seems like they use a Formlayout so i'm not entirely sure if it might just be that and not a style.

Another Edit: While it is possible to do with css (using mainly display:inline-block) it is probably easer to just a CssLayout/Horizontallayout, a label and a seperate Textfield.