[Lazarus] Inconsistent results from MessageDlg()
Mattias Gaertner
nc-gaertnma at netcologne.de
Thu Apr 26 19:55:13 CEST 2012
On Wed, 25 Apr 2012 18:19:49 +0200
Bart <bartjunk64 at gmail.com> wrote:
> Hi,
>
> I have created a patch which behaves like this:
> (see: http://bugs.freepascal.org/view.php?id=21801#attachments , file:
> msgdlg.diff)
>
>
> If the widgetset has a (native) PromptUser function, then the
> behaviour of the dialog is as follows:
> - Escape and [X]-bordericon will return mrCancel
>
> If no widgetset specific PromptDialog is set up, then eventually
> TPromptDialog.CreateMessageDialog() is called.
> I have changed it's behaviour to be compatible with Delphi:
> - [X]-bordericon will return mrCancel
> - Escape will only close the dialog if mbOk, mbNo or mbCancel is in Buttons,
> in this case it will return mrCancel, mrNo or mrOk (in that order)
> It does so by setting the Cancel property of the appropriate Button
> (as long as TBitBtn.Cancel works across widgetsets, this should
> work, but I can only test this on windows myself)
>
>
> This behaviour is consistent with both older Delphi's and newer ones
> using the new Vista-dialogs (as does Lazarus).
>
> To properly resond to mbClose, the proposed patch from
> http://bugs.freepascal.org/view.php?id=0021844 should also be applied.
>
> Can one of the Lazarus devels take a look at my proposed patch and
> apply or give feedback?
Can you update the fpdocs too for MessageDlg?
Mattias
More information about the Lazarus
mailing list