[Lazarus] MessageDlg() return type
DrDiettrich1 at aol.com
Wed Sep 12 18:07:21 CEST 2012
Graeme Geldenhuys schrieb:
> On 12/09/12 15:03, Mattias Gaertner wrote:
>> TModalResult = low(Integer)..high(Integer);
>> I changed the result type to TModalResult.
> OK, that makes more sense.
> Now what return result is TWidgetSet.PromptUser() supposed to return?
> Also a TModalResult?
> The reason I ask, is because in fpGUI the return result of a
> TfpgMessageDialog is a button type (the button the user clicked), and I
> need to know how to map that button type to a LongInt (or LCL
> TModalResult) or whatever PromptUser() must return.
I'd suggest to base both the button types and modal results on the same
enum. Eventually mrNone will be excluded from the buttons set (no mbNone).
mr/mbHelp should be returned only when the dialog didn't handle it already.
More information about the Lazarus