View Full Version : finding events for a given component

14 Nov 2012, 4:10 PM
How can I see programmatically or in the docs view the available listeners for a given component? For example, on a treepanel I can add "load" listener to the config when I create it, but I wouldn't know looking at the docs whether this listener existed if not for random examples around the net.

var panel = Ext.create('Ext.tree.Panel', {
xtype: 'treepanel',
listeners: {
load: ...

In my current case, I have a panel set to "draggable" and am trying to figure how to setup events it can fire when it is dragged and dropped, but I can't see this documented anywhere.

14 Nov 2012, 4:22 PM
You should look at Ext API docs: http://docs.sencha.com/ext-js/4-1/#!/api.

14 Nov 2012, 5:19 PM
You should look at Ext API docs: http://docs.sencha.com/ext-js/4-1/#!/api

Thank you, but my question wasn't where to find the docs. If the listeners for a given component are shown in the docs, where are they located.

14 Nov 2012, 5:25 PM

See "events" in the toolbar.

Tim Toady
14 Nov 2012, 5:26 PM
Every component has a list of events you can create a listener for. Just mouse over events at the top of the documentation for the component or just scroll towards the bottom.