-
10 Feb 2010 2:50 PM #1
LayoutConfig problem
LayoutConfig problem
Hi,
i am new to extjs. I am looking for a function to setLayoutConfig on the fly. For example: i have button and after click i want to change accordion layoutConfig. Functions like setLayoutConfig() or setLayout() do not work or i am doing smth wrong. Changing title works perfectly. Here is code:
Code:var setAccordionStyle = function (menuItem, checked) { if (checked == true){ var type = menuItem.text.toLowerCase(); Ext.getCmp('east-panel').setTitle('East Region - Acc style: ' + menuItem.text); if (type == 'standard'){ Ext.getCmp('east-panel').setLayoutConfig({ titleCollapse: false, animate: true, }) }else if (type == 'noeffect'){ Ext.getCmp('east-panel').setLayoutConfig({ titleCollapse: false, animate: false }) }else if (type == 'ontop'){ Ext.getCmp('east-panel').setLayoutConfig({ titleCollapse: false, animate: true, activeOnTop: true }) } } }
-
10 Feb 2010 5:04 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 434
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
10 Feb 2010 11:08 PM #3
This is not what i want. I dont want to remove whole panel and make it again with only layout changed. I want to change only layoutConfig without removing then adding item to container. Is this possible??


Reply With Quote