[Lazarus] Inconsistent results from MessageDlg()

zeljko zeljko at holobit.net
Sun Apr 29 12:00:38 CEST 2012


On Sunday 29 of April 2012 10:40:18 patspiper wrote:
> On 28/04/12 13:37, Bart wrote:
> > Here's the alternative implementation: Escape will always return
> > mrCancel, both LCL's own CreatemessageDialog and
> > Widgetset.PromptUser().
> > 
> > See attached file: msgdlg.alternative.diff
> > (Diff's for the first solution are in the bugtracker)
> 
> This alternative implementation seems to be in line with Delphi XE's
> result for MessageDlg('test', mtInformation, [mbOk, mbAbort], 0) when
> Escape key is pressed: mrCancel


hm...just fixed qt part for EscapeButton, but when testing QuestionDlg() seem 
that Cancel = True maps one button as cancel result (Escape or [x]) under gtk2 
and qt eg. QuestionDlg('Confirm','Please confirm me',
[mrYes,'Yes',mrAbort,'Abort'],0) returns mrAbort when escape key or [x] is 
clicked.
If we are following behaviour of MessageDlg, QuestionDlg should return 
mrCancel in any case when Escape key is pressed or [x] is clicked.
Anyone can test what QuestionDlg() is doint under Delphi XE ?

zeljko

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120429/39734b5b/attachment-0003.html>


More information about the Lazarus mailing list