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
25902.png

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…