Saturday, January 15, 2011

extjs Adding html to panel

After struggling to check why is my panel no reflecting,
i realised ive forgotten to call doLayout in the end.

To add a html to a extpanel,
Ext.getCmp("panelid").add( {
type: "panel",
html: "some html here"
});

Ext.getCmp("panelid").doLayout();


To remove all html content in a panel:
Ext.getCmp("panelid").removeAll();
//only works in 2.2.1 all later



No comments: