Monday, July 8, 2013

Re: Label text with..

I solve...

how to..

origenal source...

HorizentalPanel hPanel = new HorizentalPanel();
hPanel.setWith("100%");

hPanel.add(label);


solved source... ( hPanel.setWidth("100%") remove )
HorizentalPanel hPanel = new HorizentalPanel();
hPanel.add(label);



2013년 7월 8일 월요일 오후 4시 53분 35초 UTC+9, jhpark 님의 말:
sorry, I can't write Engish.



Label white space is defferent.

problem ===================
label.gettext = "1"            -> white space length =  14px
label.gettext = "123"         -> white space length  =  17px
label.gettext = "1234567"  -> white space length  =  30px


I want =================
label.gettext = "1"            -> white space length =  14px
label.gettext = "123"         -> white space length =  14px
label.gettext = "1234567"  -> white space length =  14px



how...

Source Code..



if ( row %2==0 ){
lbl.setText("1");
}
if ( row %3==0 ){
lbl.setText("123");
}
if ( row %4==0 ){
lbl.setText("1234567");
}
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
int length = lbl.getElement().getClientWidth();
lbl.setWidth(length+"px");
lbl.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
.
}
});

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment