Re: [Lazarus] MessageDlg default button

2012-01-26 Thread shoKwave
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 ?', mtWarn

Re: [Lazarus] MessageDlg default button

2012-01-26 Thread Koenraad Lelong
On 26-01-12 11:26, michael.vancann...@wisa.be wrote: Do not use Yes/No buttons. Use QuestionDlg and do something like If QuestionDlg('Attention','Data already exists. What to do', mtWarning,[mrYes,'Overwrite',mrNo,'Keep existing data'])=mrYes then This is a better dialog, and allows you to put

Re: [Lazarus] MessageDlg default button

2012-01-26 Thread michael . vancanneyt
On Thu, 26 Jan 2012, Koenraad Lelong wrote: Hi, I'm using a MessageDlg to show some information, with multiple buttons. Unfortunately, in this case, I would like to have another button as default. Is there a way to do this ? What I have : if MessageDlg('Attention', 'Data does exist, overw

[Lazarus] MessageDlg default button

2012-01-26 Thread Koenraad Lelong
Hi, I'm using a MessageDlg to show some information, with multiple buttons. Unfortunately, in this case, I would like to have another button as default. Is there a way to do this ? What I have : if MessageDlg('Attention', 'Data does exist, overwrite ?', mtWarning,[mbNo, mbYes],0) = mrYes the