1. #1
    Sencha User michaelc's Avatar
    Join Date
    Dec 2007
    Location
    Bay Area - CA
    Posts
    507
    Vote Rating
    0
    michaelc is on a distinguished road

      0  

    Default confirm with ok - cancel buttons

    confirm with ok - cancel buttons


    just wondering how can I change a confirm dialog so that the button are ok and cancel
    vs. yes and no.

    Code:
                                       Ext.MessageBox.confirm('title', 'message',function(s){                              
                                       });
    looks like I need to define a messagebox vs. using the shorthand confirm.

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,064
    Vote Rating
    659
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Confirm is just a shortcut for calling show(), so you can call that and pass in the appropriate options.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha - Community Support Team VinylFox's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,501
    Vote Rating
    8
    VinylFox will become famous soon enough VinylFox will become famous soon enough

      1  

    Default


    Just to expand on that answer with an example...

    Code:
    Ext.Msg.show({
       title:'Do Something',
       msg: 'Ok or Cancel?',
       buttons: {yes: 'Ok', no: 'Cancel'},   // or Ext.Msg.OKCANCEL
       fn: Ext.emptyFn
    });

  4. #4
    Sencha Premium Member
    Join Date
    Apr 2012
    Location
    India
    Posts
    33
    Vote Rating
    1
    Gunasekar.Jabbala is on a distinguished road

      1  

    Question Hot Key Implementation for Message box buttons Yes, No , Cancle

    Hot Key Implementation for Message box buttons Yes, No , Cancle


    Hi,

    Is there anybody implemented shortcut keys for message box yes, no cancle. like alt+y, alt+n, alt+c. I am having a requirement to achive the same. so any body implemented this feature, please share ur idea.

    Thanks in advance

    Gunasekar Jabbala