AppleGrew
AppleGrew

Reputation: 9578

How do I show a Next button on Sencha NavigationView?

Sencha adds a nice Back button to the navigation bar. As shown below.

Back button in NavigationView

So my questions are:-

Upvotes: 0

Views: 570

Answers (1)

SachinGutte
SachinGutte

Reputation: 7055

You can change appearance of button to look alike forward button by setting ui : "forward" config for button.

You can add buttons to navigation bar with following way -

    navigationBar : {           
        items:[
            {
                xtype:'button',
                text:'Forward',
                ui:'forward'
            }
        ]
    },

You can also add buttons dynamically to navigation bar from controller. First get instance of navigation view and then navigation bar. Create some buttons and add them to it.

   var navBar = this.getMyNavView().getNavigationBar();
    var button = Ext.create('Ext.Button', {
        text: 'Button'
    });
    navBar.add(button);

update Found this issue for ui : 'forward' on sencha forum. Have a look at it.

http://www.sencha.com/forum/showthread.php?253899-When-using-ui-forward-and-back-the-buttons-are-not-being-rendered-properly

Upvotes: 1

Related Questions