On 22/04/12 15:02, zeljko wrote:

On Sunday 22 of April 2012 13:35:59 patspiper wrote:

> On 22/04/12 14:09, zeljko wrote:

> > On Sunday 22 of April 2012 12:28:43 Bart wrote:

> > > Hi all,

> > >

> > >

> > >

> > > MessageDlg eventually calls WidgetSet.PromptUser()

> > >

> > > This in return either calls and sets up a widgetset specific function

> > >

> > > (like TaskDialogIndirect on Windows Vista/Win7) or if such an

> > >

> > > implementations does not exist it calls

> > >

> > > TPromptDialog.CreateMessageDialog() and the LCL will build it's own

> > >

> > > MessageDialog form with appropriate buttons etc.

> > >

> > >

> > >

> > > I see 3 problems (see http://bugs.freepascal.org/view.php?id=21801 ).

> > >

> > >

> > >

> > > 1.

> > >

> > >

> > >

> > > How to handle clicking on X-border-icon?

> >

> > afair, qt and gtk2 have default result for that and escape key (you

> > can set on dialog what is the value of default result for [X] and

> > escape), result should be mrCancel in any case.

>

> +1

>

> The current result for Escape and [x] (at least under GTK2) is mrOK

> which is very misleading.


Maybe in case when there's only one button (mbOK). Have you tested with eg. mbYes,mbNo or others ?

You are partially right on this. I tested all the buttons with MessageDlg and this is the order of precedence from high to low:
mrOK
mrCancel
mrNo
mrAbort
mrIgnore
mrNoToAll
mrYes
mrRetry
mrAll
mrYesToAll

if mbClose is the only button, the modal result is mrCancel.

Also , maybe I didn't spotted that in my applications since i never evaluate 1.

Pls disregard my point #1. It is not very logical.

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

Reply via email to