-
Ext User
how to get tab panel title from activate listener
Hi. Quick question...how do I get the tab panel's title from the activate listener? I'm trying to write a tab activate listener to load info into a GridPanel dynamically depending on which tab is selected. I noticed that there's a convenience method setTitle in Panel, but not a getTitle. Any ideas? Thanks in advance.
-
you can use the tabpanel's tabchange event. it's detailed in the docs.
-
Ext User
>you can use the tabpanel's tabchange event. it's detailed in the docs.
No, that still doesn't help me. Sure I can use a different listener, but I still get Panel objects and I don't see how to get the title from the panel.
-
did you actually READ it?!
activate : ( Ext.Panel p )
Fires after the Panel has been visually activated. Note that Panels do not directly support being activated, but some Panel subclasses do (like Ext.Window). Panels which are child Components of a TabPanel fire the activate and deactivate events under the control of the TabPanel.
Listeners will be called with the following arguments:
* p : Ext.Panel
The Panel that has been activated.
-
and you can access the panel.title attribute.
-
Ext User
did you actually READ it?!
activate : ( Ext.Panel p )
Fires after the Panel has been visually activated. Note that Panels do not directly support being activated, but some Panel subclasses do (like Ext.Window). Panels which are child Components of a TabPanel fire the activate and deactivate events under the control of the TabPanel.
Listeners will be called with the following arguments:
* p : Ext.Panel
The Panel that has been activated.
Yes, I did. You're not understanding the question. I have one activate/tabChange listener for the tabPanel. I need to obtain the title of the panel object that gets passed in to my listener. How do I do that?
-
Ext User
Thanks, it works. Just checked, and it's not documented as being a public property of the Panel, but only a property of the config object. That's why I didn't know.
-
explore the object
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules