PDA

View Full Version : Open Item in Accordion Menu



joefox
14 Aug 2009, 12:42 PM
I have 3 items in my accordion menu, id's adda, arr, and ssm

I wanted to open one of these with a button click that i have, and cant seem to get it to work, I was able to do this with tabs, but dont know how for items in an accordion menu.

var myTabPanelReference = Ext.ComponentMgr.get('arr') ;
myTabPanelReference.show();

Animal
14 Aug 2009, 12:47 PM
It's not hidden.

It's collapsed.

Expand it.

joefox
14 Aug 2009, 1:25 PM
It's not hidden.

It's collapsed.

Expand it.


so like this?

var myTabPanelReference = Ext.ComponentMgr.get('arr') ;
myTabPanelReference.Expand();

Then how do i close it?

Animal
14 Aug 2009, 1:27 PM
Well. Does that work?

Does that code match ANYTHING you find the in the Panel API doc?

joefox
14 Aug 2009, 1:30 PM
Nope didnt work, i dont know where to look inthe docs.

Animal
14 Aug 2009, 1:31 PM
Panel?

joefox
14 Aug 2009, 1:32 PM
ok?

Animal
14 Aug 2009, 1:33 PM
Yep.

joefox
14 Aug 2009, 1:47 PM
I see collapsed (http://extjs.com/deploy/dev/docs/source/Panel.html#cfg-Ext.Panel-collapsed) ?

I tred this and it didnt work

var myTabPanelReference = Ext.ComponentMgr.get('arr') ;
myTabPanelReference.collapsed(false);

andycramb
14 Aug 2009, 1:56 PM
use the method collapse (http://extjs.com/deploy/dev/docs/source/Panel.html#method-Ext.Panel-collapse)

Collapsed is a read only property

andycramb
14 Aug 2009, 1:58 PM
var myTabPanelReference = Ext.getCmp('arr') ;
myTabPanelReference.collapse(true//animates if desired);

joefox
14 Aug 2009, 2:14 PM
I have a hyperlink that i click, and in my javascript function, i just want it to open up the tab that i send it.

So close the other 2 i have, and open the one i say to open.

Animal
14 Aug 2009, 10:49 PM
use the method collapse (http://extjs.com/deploy/dev/docs/source/Panel.html#method-Ext.Panel-collapse)

Collapsed is a read only property

Why should you have to say this? Why does it mean more to people if they have bothered people and caused them to waste their time to QUOTE the documentation?

People insist on having the exact same information that is in the API docs regurgitated to them by a human! The docs might as well be streams of random characters.

joefox
17 Aug 2009, 9:25 AM
Why should you have to say this? Why does it mean more to people if they have bothered people and caused them to waste their time to QUOTE the documentation?

People insist on having the exact same information that is in the API docs regurgitated to them by a human! The docs might as well be streams of random characters.

You need to remember that some people are not programmers, and are just getting into this, so sometimes its better to see an example and relay that to the documentaion instead of the other way around.

Also, when people reply with comments the degrade the community memebers, who are the one who support this, does not shed great light on the foundation.