[CLOSED] Setting No button Focus in the message box

  1. #1

    [CLOSED] Setting No button Focus in the message box

    Hi.

    i was wondering how to set focus in messagebox confirm to No button. By default it is set to Yes.. but generally When something is to be deleted the No button should be set initially..

    Ext.MessageBox.confirm('Confirm',message);
    Thanks in advance,

    Regards,
    Madan

  2. #2

    RE: [CLOSED] Setting No button Focus in the message box

    Hi Madan,

    There isn't a great way to do this currently, but the following does work.

    Example

    var dlg = Ext.Msg.confirm('Confirm', 'Do you really want to do this?').getDialog();
    dlg.defaultButton = 2;
    dlg.focus();
    The following forum thread might be helpful as well, see http://extjs.com/forum/showthread.php?t=50514

    Geoffrey McGill
    Founder
  3. #3
    Here's another related thread. Just cross-linking these two together.

    http://forums.ext.net/showthread.php...-Configuration
    Geoffrey McGill
    Founder

Similar Threads

  1. [CLOSED] Set Focus to OK button in Ext.Msg.Show
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 13, 2011, 1:12 PM
  2. [CLOSED] Button focus style
    By jeybonnet in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Mar 28, 2011, 12:11 PM
  3. [CLOSED] Button Focus
    By SymSure in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 07, 2011, 1:45 PM
  4. Button Focus Cls
    By David Pelaez in forum 1.x Help
    Replies: 2
    Last Post: Feb 25, 2011, 7:07 AM
  5. setting focus on nth column of nth row in a grid
    By n_s_adhikari@rediffmail.com in forum 1.x Help
    Replies: 1
    Last Post: Dec 25, 2009, 5:14 AM

Posting Permissions