I have a button in a panel which gets rendered inside a window. And I want to be able to add that button to a bottom bar in the window.
Current I am trying to add an onRender function to the panel to get the parent window using this.findParentByType('Ext.Window')
however it returns null.
I am even heading in the right direction?
EDIT: I am using extjs 3.2.2
findParentByType
takes xtype as parameter. So in your case you should use
this.findParentByType('window')
or
this.up('window')
您是否尝试过为窗口提供唯一的ID并向其添加按钮,如下所示:
Ext.getCmp('myWindowId').add(buttonPanel);
@Nitin Singhal @Reflux
For ExtJS4: Ext.ComponentManager.get('html dom id')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.