Link to home
Start Free TrialLog in
Avatar of stendresse
stendresse

asked on

Default button in a MessageDlg box


How can I determine wich button will be the default on in a MessageDlg box ?

MessageDlg('bla bla ?' , mtConfirmation,
      [mbYes, mbNo], 0) = mrYes ;
I want the "No" button to be the default one.
ASKER CERTIFIED SOLUTION
Avatar of Mohammed Nasman
Mohammed Nasman
Flag of Palestine, State of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of edsteele
edsteele

You should be able to do it by placing the mbNo entry before the mbYes entry.  This will have the side effect of make the "No" button on the left and the "Yes" button on the right.  If you can live with that, then here is your new code:

MessageDlg('bla bla ?' , mtConfirmation, [mbNo, mbYes], 0) = mrYes;
Avatar of stendresse

ASKER

thank you edsteele, but I already tried that but it do not work :(
Really?!?  What did it give you?