-
5 Nov 2012 7:31 AM #1
Answered: Toggle carousel indicator
Answered: Toggle carousel indicator
Hi,
Is there a way to toggle a carousel's indicator at runtime (so, to set its indicator property to true or false, once it's loaded in page)?
Thanks!
-
Best Answer Posted by mitchellsimoens
The setter will destroy the old indicator and create a new one which works but is not optimal. You can just hide the one that is created:
Code:carousel.getIndicator().hide(); carousel.getIndicator().show();
-
5 Nov 2012 8:23 AM #2
Code:carousel.setIndicator({hidden:true})//hide the indicator carousel.setIndicator({hidden:false})//show the indicatorI write English by translator.
-
5 Nov 2012 8:29 AM #3
Somehow I keep forgetting that configuration options are set using the setConfigName() methods... Thanks!
-
7 Nov 2012 6:27 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,684
- Vote Rating
- 435
- Answers
- 3111
The setter will destroy the old indicator and create a new one which works but is not optimal. You can just hide the one that is created:
Code:carousel.getIndicator().hide(); carousel.getIndicator().show();
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.
-
7 Nov 2012 8:00 AM #5
-
7 Nov 2012 8:13 AM #6Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,684
- Vote Rating
- 435
- Answers
- 3111
If you add/remove components to the carousel the indicator will stay in sync with that yes.
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.


Reply With Quote