I have three form with few TextField in my View (GridLayout), I need to designate each form with black line borders. How Can I do that. Do I need include css? Thanks in advance!
Yes, you need to add a style to the GridLayout.
final GridLayout gridLayout = new GridLayout();
// Add stuff to it ...
gridLayout.addStyleName("your-css-tag");
In your theme css (in my workspace webapp/VAADIN/themes/mytheme/mytheme.scss):
.your-css-tag {
border-style: solid;
border-color: black;
border-width: 1px;
padding: 5px;
}
You may need a rebuild of your project, to incorporate the CSS. In Maven, that means executing the Lifecycle tasks clean and install.
For more information, see the manual chapter on Themes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With