Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vaadin Grid layout borders

Tags:

css

vaadin

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!

like image 649
Jumper Avatar asked Jan 18 '26 03:01

Jumper


1 Answers

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.

  • Version 7, Themes
  • Version 8, Themes
  • Version 10, Themes
like image 128
Geir Thomas Jakobsen Avatar answered Jan 19 '26 18:01

Geir Thomas Jakobsen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!