-
6 Mar 2012 7:34 AM #1
Unanswered: Sliding out a Panel
Unanswered: Sliding out a Panel
Hey guys,
Since there aren't alot of tutorials for v2 yet, I'm just learning as I go based on the API-documentation, but unfortunately I'm a little fuzzy on some things. For example: I've built an app with a title-bar with some buttons, and below that an hbox-panel with 2 items. I want to slide the left-most panel out of screen upon clicking a button in the top-bar, but I'm not sure how to write the handler for this... Anyone care to help me out?
Thanks!Code:ui: 'back', text: 'Terug', handler: function(){ // what goes here? }
Steven
-
6 Mar 2012 8:34 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
- Answers
- 3155
So you want to use Ext.Anim to slide the panel out?
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.
-
6 Mar 2012 11:53 AM #3
Uh yeah... I think so... I tried that but when I use 'toolbar' (which I'd defined as the ID of the element I wanna slide out) I get Uncaught TypeError: Cannot call method 'run' of undefined in my DOM-inspector... Am I missing something here selector-wise?
-
6 Mar 2012 12:03 PM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
- Answers
- 3155
Have you loaded Ext.Anim?
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.
-
6 Mar 2012 12:19 PM #5
Lol, ok thnx for that (no I didn't). I've now loaded it in requires for my Ext.Application, but still no dice... error is gone though...
-
7 Mar 2012 12:59 PM #6
Any thoughts on this? Here's my code:
Code:ui: 'back', text: 'Terug', handler: function(){ Ext.Anim.run('toolbar', 'slide', { out: true, autoClear: false }); }


Reply With Quote