Results 1 to 2 of 2

Thread: Disable Back and Next Buttons

  1. #1

    Default Disable Back and Next Buttons


    I am using the following toolbar for a panel that uses a card layout:

        dockedItems: [{
                    xtype: 'toolbar',
                    dock: 'bottom',
                    items: [{
                        text: 'Previous',
                        ui: 'back',
                        handler: function() {
                                type: 'slide',
                                direction: 'right'
                            }, false); // true to wrap.
                    }, {xtype: 'spacer'}, {
                        text: 'Next',
                        ui: 'forward',
                        handler: function() {
                                type: 'slide',
                                direction: 'left'
                            }, false);
    Is there any way to disable the Next button if I've reached the last card in my panel's items and re-enable it when I tap the back button? I'd like to do the same thing with the Previous button with it starting out disabled and then becoming enabled when the Next button is tapped.

    Thanks for all of your help as always!


  2. #2
    Sencha User
    Join Date
    Mar 2007
    Haarlem, Netherlands


    You could listen for the cardswitch event, check the index of the card, and call disable and enable on the back and forward buttons accordingly.

Similar Threads

  1. Replies: 3
    Last Post: 15 Jun 2008, 1:31 PM
  2. TabPanels with Toolbar Back and Forward buttons
    By neuwk in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 8 Jan 2008, 8:40 AM
  3. how to disable webbrowser's Back && Forward buttons ?
    By mxu in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 29 Nov 2007, 1:14 PM
  4. Replies: 4
    Last Post: 9 May 2007, 12:59 AM

Posting Permissions

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