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


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to