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.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Align button inside cell table
Hello,
I added a button inside a cell table, but I don't get it align to the left (see the image , the add icon is displayed always on the right side of the cell)
My code:
m_oComenziTable.addContainerProperty("+",Component.class,null);
m_oComenziTable.setColumnWidth("+",10);
m_oComenziTable.setColumnAlignment("+", Align.RIGHT);
m_oComenziTable.addContainerProperty("Nr.",Long.class,null);
m_oComenziTable.setColumnWidth("Nr.",40);
.....
Button oButtonAdaugaSubcomanda = new Button("");
oButtonAdaugaSubcomanda.setDescription("adauga subcomanda");
oButtonAdaugaSubcomanda.setIcon(new ThemeResource("../easyship/img/Add-icon.png"));
oButtonAdaugaSubcomanda.setStyleName(BaseTheme.BUTTON_LINK);
oButtonAdaugaSubcomanda.setHeight("16px");
oButtonAdaugaSubcomanda.setWidth("16px");
oButtonAdaugaSubcomanda.setData(oSubcomanda.getScoId());
...
m_oComenziTable.addItem(new Object[]{
oButtonAdaugaSubcomanda,
Thank you
Hi,
in case you want to align your icon to the left/center replace "m_oComenziTable.setColumnAlignment("+", Align.RIGHT);" with Align.LEFT / Align.CENTER.
regards
Johannes
Also with the Align.LEFT / Align.CENTER there is an extraspace on the left side between left side of the cell and the icon...