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.

Vaadin 7.6.4 Gridlayout borders

Phillip Larkin
6 years ago Mar 22, 2016 6:14pm
Joacim Päivärinne
6 years ago Mar 24, 2016 3:03pm

Hey Philip,

Try this:

@Override
protected void init(VaadinRequest request) {
  final CssLayout layout = new CssLayout();
  setContent(layout);
  layout.setSizeFull();

  GridLayout grid = new GridLayout(3, 3);
  for (int i = 0; i < grid.getColumns() * grid.getRows(); i++) {
    grid.addComponent(new Label("Cell " + i));
  }
  grid.setSizeFull();

  layout.addComponents(grid);
}

SCSS

.v-gridlayout-slot {
  border: 1px solid rgba(0,0,0,0.12);
}