-
17 Oct 2012 1:58 AM #1
Answered: Styling the back button
Answered: Styling the back button
I am building an app and have used the navigationview component which dynamically creates a Back button when opening a new page.
I would like to style the toolbar so I have employed the sencha-toolbar-ui and sencha-button-ui @includes in my SASS file.
However, the Back button is not displaying the correct style. How do I get the custom style applied to the Back button without creating custom CSS?
Thanks.
-
Best Answer Posted by mitchellsimoens
The back button has the ui config set to back. To change it you can do:
Code:{ navigationBar : { backButton : { align : 'left', hidden : true, ui : '...........' } } }
-
19 Oct 2012 4:15 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3107
The back button has the ui config set to back. To change it you can do:
Code:{ navigationBar : { backButton : { align : 'left', hidden : true, ui : '...........' } } }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.
-
20 Oct 2012 5:22 AM #3
Hi Mitchell, thanks for responding.
I have tried your advice and it successfully applies my custom colour scheme.
However, it has removed the nice arrow shaped border that the Back button has.
Do you know if there is a way of keeping the arrow shape for the Back button whilst applying a custom theme?
Many thanks
-
20 Oct 2012 5:57 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3107
You need to extend the back ui and apply your custom colors
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.
-
20 Oct 2012 7:17 AM #5
I got it to work by doing this:
backButton: {
ui: 'customThemeName-back'
}
I didn't know you could concatonate different styles to make 'customThemeName-back', but it works!
Thanks for your help.


Reply With Quote