Page 1 of 1

MessageDlg with DefaultButton parameter

Posted: Fri Feb 18, 2005 11:37 pm
by BillHop3
With Windows' MessageBox API, whenever we prompt the user to confirm a deletion, we pass MB_YESNO | MB_DEFBUTTON2, allowing the "No" to be both the Default and Cancel button. The CLX version of MessageDlg adds an optional DefaultBtn parameter (serving the same purpose) that isn't in the VCL or your version of MessageDlg.
I've experimented with YesToAll/NoToAll with the captions renamed, etc., but I cannot get the MessageBox behavior without changing your code.

Please add an optional DefaultBtn parameter to your MessageDlg implementation.

P.S. It'd be even better if mtWarning, etc. types also triggered the appropriate system events so they 'beep'ed like MessageBox does.

Posted: Sat Feb 19, 2005 5:49 am
by isiticov
Thanks for your suggestion. We will try to implement this.