PDA

View Full Version : [CLOSED] How to take up the whole area of the center region panel of a viewport



RCM
Jun 18, 2012, 3:17 PM
Good Day,

In my viewport, I have a panel positioned to center region. I am dynamically loading the content of the panel as below:


Ext.Ajax.request({
params: {
containerId: 'MainContentPanel'
},
url: requestUrl,
success: function (response) {
eval(response.responseText);
}
});

What I am trying to achieve is that loaded content for the panel automatically take up the whole area of the panel, i.e., 100% in width. Please let me know what I should do. Much appreciated.

Regards,
Xiaogang

Daniil
Jun 18, 2012, 3:42 PM
Hi,

Could you wrap the code in [CODE ] tags please? See #3:
More Information Required (http://forums.ext.net/showthread.php?10205)

Daniil
Jun 18, 2012, 6:43 PM
Hi,

Thanks for editing.

Please clarify what content do you load into a center region panel?

If an Ext.NET component, then, to achieve your requirement you should set up

Layout="FitLayout"
fort the center region Panel and add the content widget using the add method.

centerRegionPanel.add(contentWidget);
centerRegionPanel.doLayout();

Please note that only Ext.NET components can participate in Ext.NET layout engine. Non Ext.NET content, for example, raw HTML, you could wrap into an <ext:Container>. In a different way, you will need to manage sizes manually.

By the way, I would use Loader to load Ext.NET components.
http://examples2.ext.net/#/Loaders/Component/Http_Handler/
http://examples2.ext.net/#/Loaders/Component/JSON_WebService/
http://examples2.ext.net/#/Loaders/Component/Direct_Method/