View Full Version : Simulate event mouseclick in collapsed accordion

11 Aug 2010, 7:09 AM

I need to "simulate" a mouseclick in a collapsed accordion, when the mouse is over it, showing its contents but not expanding it.

Couldn't find anything about that.

Thanks in advance.

11 Aug 2010, 7:11 AM
A mouseenter listener on the header element?

Which would then.... do something to show the contents somehow.

11 Aug 2010, 7:11 AM
Maybe if it's a kind of "preview" you need, a ToolTip might be best.

11 Aug 2010, 7:21 AM
I don't think that's my problem. Here is my code:

var pnPoop = new Ext.Panel({
title: '<span class=textblackbold>Pontos Operacionais</span>',
contentEl: 'poop',
collapsible: false,
titleCollapse: false

//var viewport = new Ext.Viewport({
var viewport = new Ext.FormViewport({
layout: 'border',
items: [
region: 'west',
id: 'west-panel',
split: true,
width: 300,
minSize: 100,
maxSize: 400,
collapsible: true,
margins: '0 0 0 0',
autoHeight: true,
layout: {
type: 'accordion',
animate: false
items: [ pnPoop ]
new Ext.TabPanel({
region: 'center',
id: 'center-panel',
deferredRender: false,
activeTab: 1,
enableTabScroll: false,
items: [{
contentEl: 'tab1',
itemId: 'tabMapa',
title: 'Visualização Geográfica',
autoScroll: true
}, {
contentEl: 'tab2',
itemId: 'tabProg',
title: 'Visualização Painel',
autoScroll: true

What I want to do is, when mouseover on collapsed west-region (after user clicks the collapse button), it acts the same way as when I click on it (not in the expand button, but in the collapsed region area).

11 Aug 2010, 7:39 AM
Oh, so nothing to do with accordion then.

OK, you'll have to hack the http://dev.sencha.com/deploy/dev/docs/?class=Ext.layout.BorderLayout.Region class.

Add a mouseenter listener to the collapsedEl which calls slideOut, and a mouseleave listener which calls slideIn

11 Aug 2010, 8:09 AM
Just don't have a clue on how to do that... please help.

11 Aug 2010, 9:27 AM
What do you mean by "help"?

Javascript lessons?

You want me to write a plugin?

11 Aug 2010, 9:46 AM
Not a javascript lesson, or your plugin-writing time. Can you give me links with specific examples for your solution?
Thanks in advance.

10 Apr 2013, 12:58 AM
in my case I did it :


1) container = your accordion panel
2)by query i have got needed item on accordion
3)by expand() i do what i want