PDA

View Full Version : [CLOSED] Beta4 Info.display() clips second line



andrey
3 Jun 2008, 10:25 AM
If you run the code below in the GWT shell, the Info dialog clips the second line of the message.



import com.extjs.gxt.ui.client.Events;
import com.extjs.gxt.ui.client.event.BaseEvent;
import com.extjs.gxt.ui.client.event.Listener;
import com.extjs.gxt.ui.client.widget.Info;
import com.extjs.gxt.ui.client.widget.Viewport;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.button.ButtonBar;
import com.extjs.gxt.ui.client.widget.layout.FillLayout;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;

public class TestInfoDialog implements EntryPoint {
public void onModuleLoad() {
Viewport viewport = new Viewport();
viewport.setLayout(new FillLayout());

Button button = new Button("Press me");
button.addListener(Events.Select, new Listener<BaseEvent>() {
public void handleEvent(BaseEvent be) {
Info.display("Info Test", "This is a really, really, really, really, really, really, really long info message", "");
}
});

ButtonBar buttonBar = new ButtonBar();
buttonBar.add(button);

viewport.add(buttonBar);
viewport.layout();
RootPanel.get("slot1").add(viewport);
}
}
Thx,
Andre

jraue
4 Jun 2008, 11:14 AM
I have the same issue.

jraue
12 Jun 2008, 4:33 AM
Problem persists in beta5.

jraue
31 Jul 2008, 6:17 AM
Problem persisting in Version 1.1, any news?

darrellmeyer
2 Aug 2008, 9:16 AM
Info will not size based on its content size, you must set the size using InfoConfig:


button.addListener(Events.Select, new Listener<BaseEvent>() {
public void handleEvent(BaseEvent be) {
InfoConfig config = new InfoConfig("Info Test", "This is a really, really, really, really, really, really, really long info message");
config.height = 90;
Info.display(config);
}
});

abickford
8 Aug 2008, 5:46 AM
Info will not size based on its content size, you must set the size using InfoConfig:


button.addListener(Events.Select, new Listener<BaseEvent>() {
public void handleEvent(BaseEvent be) {
InfoConfig config = new InfoConfig("Info Test", "This is a really, really, really, really, really, really, really long info message");
config.height = 90;
Info.display(config);
}
});


Shouldn't it? When would clipping the content ever be the desired effect? I often times don't know how long the content is because it's coming from an RPC call.

jraue
10 Aug 2008, 11:54 PM
I would also appreciate it resizing content-dependent as it did previously. Would that be possible, Darrell?

darrellmeyer
11 Aug 2008, 8:43 AM
I agree that it would be useful for the height to be calculated based on the content being displayed. I have added this to the list of open items.

abickford
12 Aug 2008, 6:03 AM
I agree that it would be useful for the height to be calculated based on the content being displayed. I have added this to the list of open items.

Thanks. Everything else is so polished that a clipping line really catches the end user's attention.