PDA

View Full Version : [CLOSED] [1.2.3] ComboBox expand picture not counted in width when aligned right



psionic1
24 Apr 2009, 2:04 AM
Right-aligned combo expand picture is outside of its container.
Code to reproduce:


public class GxtDemo implements EntryPoint {

public void onModuleLoad() {

LayoutContainer lc = new LayoutContainer();
lc.setLayout(new FitLayout());
lc.setLayoutOnChange(true);

HorizontalPanel hp = new HorizontalPanel();
hp.setBorders(true);
hp.setTableWidth("100%");

hp.add(new Html("LABEL:"));

SimpleComboBox<String> cb = new SimpleComboBox<String>();

TableData td = new TableData();
td.setHorizontalAlign(HorizontalAlignment.RIGHT);
hp.add(cb, td);

lc.add(hp);

RootPanel.get().add(lc) ;
}

}

sven
24 Apr 2009, 3:01 AM
cb.setStyleAttribute("textAlign", "left");

You need to set the Alignment back for the combo. CLOSED