PDA

View Full Version : Is it a bug? Cannot narrow down the space between FileLabel and TextFile( or Check)??



LoriSun
28 Oct 2011, 6:04 AM
Hi guys, I have experience in Extjs for 2 Years, now we try to use Ext GWT. And I got css or layout issue just like the subject.

I have tried with the methods below, but it doesn't take effect. is there any other approach can fix this????
fl_t_userOremail.setLabelWidth(2);
fl_t_userOremail.setLabelPad(2);


//Col1:==============================================================
//row1 user/email
TextField t_userOremail = new TextField();
t_userOremail.setSize("20", "18");
CheckBox cb_userOremail = new CheckBox();
HorizontalPanel cellcol1row1 = new HorizontalPanel();
cellcol1row1.setSpacing(5);

FieldLabel fl_t_userOremail = new FieldLabel(t_userOremail, "* User/Email");
fl_t_userOremail.setLabelWidth(2);
fl_t_userOremail.setLabelPad(2);

cellcol1row1.add(fl_t_userOremail);//,new HorizontalLayoutData(.65, -1));

FieldLabel fl_cb_userOremail = new FieldLabel(cb_userOremail, "Internal");
cellcol1row1.add(fl_cb_userOremail);//, new HorizontalLayoutData(.35, -1));
col1.add(cellcol1row1);

sven
28 Oct 2011, 6:17 AM
A labelWidth of 2 is probably not correct. Have you tried to use some other value, like 60?


Also you will need to set a size on the FieldLabel when using HorizontalPanel.