PDA

View Full Version : [DUP] How to control width of label in FieldLabel?



DavidHoffer
5 Jan 2012, 9:10 AM
In using GXT 3.x how can I control the width of the label when using a FieldLabel? I.e. when using the following code it gives the label way too much room.



VerticalLayoutContainer v= new VerticalLayoutContainer();
TextField a = new TextField();
a.setAllowBlank(true);
a.setReadOnly(true);
final FieldLabel aLabel = new FieldLabel(a, "A");
v.add(aLabel , new VerticalLayoutContainer.VerticalLayoutData(1, -1));


I've tried to set the width via...and it doesn't make any difference.


aLabel.setLabelPad(0);
aLabel.setLabelWidth(25);
aLabel.setPixelSize(25, -1);


Seems like aLabel.setLabelWidth(25) should work...is this a bug in 3.x?

sven
5 Jan 2012, 9:33 AM
Yes this is a known bug and is already tracked by us.

sven
5 Jan 2012, 9:34 AM
http://www.sencha.com/forum/showthread.php?163006-Set-label-size-for-formpanel-widgets

First found thread with using the forum search

DavidHoffer
5 Jan 2012, 9:43 AM
Thanks. Do you happen to have a public bug tracking system (e.g. JIRA) where I can watch this issue and get notified of progress?

sven
5 Jan 2012, 9:55 AM
We are updating the forum post if the issue got fixed.

amit.vankadia
14 May 2012, 1:37 PM
is this fixed? I am still seeing this issue.

DavidHoffer
14 May 2012, 3:35 PM
I believe it was fixed but I don't recall which RC version, which version are you using? You might want to try 3.0.0-rc2...that's the latest available in maven.

amit.vankadia
14 May 2012, 4:44 PM
Actually I am using that version. I will try 3.0 from maven repository