PDA

View Full Version : MessageBox confirm default button



muselmanach
14 Feb 2013, 10:26 AM
i am creating a message like:

Ext.Msg.show({....buttons : Ext.Msg.YESNO .....});

is there a way to set the NO button as default button instead of the yes button?
there are several post all over the internet but none of them seems to work, especially all solution trying:

Ext.Msg.defaultButton = ... or ... .getDialog()....

thx
muselmanach

scottmartin
14 Feb 2013, 11:25 AM
You can try this:



Ext.Msg.defaultButton = 'no';
Ext.Msg.show({
title:'Save Changes?',
msg: 'Would you like to save your changes?',
buttons: Ext.Msg.YESNOCANCEL,
icon: Ext.Msg.QUESTION
});


Scott

muselmanach
14 Feb 2013, 12:05 PM
lol, i could swear that i have allready tried this and it did not work.

but now it works like a charm

thx