[Lazarus] MessageDlg() return type
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Wed Sep 12 18:24:53 CEST 2012
Graeme Geldenhuys schrieb:
> Button enums are defined as follows...
>
> TMsgDlgBtn = (mbYes, mbNo, mbOK, mbCancel, mbAbort, mbRetry,
> mbIgnore,
> mbAll, mbNoToAll, mbYesToAll, mbHelp, mbClose);
>
>
> I wrote code as follows...
>
> Result := MessageDlg('My caption','error dialog with custom buttons',
> mtError, [mbOK, mbYesToAll, mbAbort, mbHelp], '');
> Writeln('Result = ', Result);
>
>
> At runtime I click on the "Abort" button and the console output is 3
> ???? I'm using LCL-GTK2.
>
> So what is 3?
It's idAbort = mrAbort. Please note that TModalResult starts with
mrNone=0, indicating "nothing" for a TButton.ModalResult, and "busy" as
TForm.ModalResult.
DoDi
More information about the Lazarus
mailing list