PDA

View Full Version : panel size



emilioF
1 Jul 2010, 3:30 PM
hi all i have a Ext.Viewport with some panel. the width is the same of the title of panel and the html inside start a new line. how i can autosize the panel according with the html inside?

Condor
2 Jul 2010, 1:07 AM
I don't understand the question. Can you describe it better and possibly post some example code?

emilioF
2 Jul 2010, 2:10 AM
this is my script http://paste.ubuntu.com/458248/ a servlet return a page html out.println("<h1>how are you? Fine thanks</h1>"); my problem is that Fine tanks go to new line because the sentence is longer than the title of panel.

Condor
2 Jul 2010, 2:21 AM
You can only do that afterwards.

Configure the 'lista' panel with autoScroll:true and use:

Ext.getCmp("lista").body.update(objServerResponse.responseText);
Ext.getCmp("lista").setWidth(Ext.getCmp("lista").body.dom.scrollWidth + 20);
(you'll need to change '20' to the exact padding width used by the panel)