[Lazarus] MessageDlg default button

shoKwave shokwave at gmx.net
Thu Jan 26 13:07:24 CET 2012


Am 26.01.2012 11:16, schrieb Koenraad Lelong:
> What I have :
> if MessageDlg('Attention', 'Data does exist, overwrite ?', 
> mtWarning,[mbNo, mbYes],0) = mrYes then ...
>
> I would like the mbNo to be the default button.
>
Hi,

you can use:

MessageDlg('Attention', 'Data does exist, overwrite ?', mtWarning,[mbNo, 
mbYes],0, mbNo)

The 6th parameter defines the default button.

Ingo




More information about the Lazarus mailing list