Results 1 to 5 of 5

Thread: Styling the back button

  1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    11
    Vote Rating
    0
      0  

    Default 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.

  2. The back button has the ui config set to back. To change it you can do:

    Code:
    {
        navigationBar : {
            backButton : {
                align   : 'left',
                hidden  : true,
                ui      : '...........'
            }
        }
    }

  3. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Answers
    3931
    Vote Rating
    1271
      0  

    Default

    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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  4. #3
    Sencha User
    Join Date
    May 2012
    Posts
    11
    Vote Rating
    0
      0  

    Default

    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

  5. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Answers
    3931
    Vote Rating
    1271
      0  

    Default

    You need to extend the back ui and apply your custom colors
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  6. #5
    Sencha User
    Join Date
    May 2012
    Posts
    11
    Vote Rating
    0
      0  

    Default

    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •