[Lazarus] Lazarus 1.6 and QuestionDLG

Mattias Gaertner nc-gaertnma at netcologne.de
Sat Dec 19 16:34:16 CET 2015


On Sat, 19 Dec 2015 11:17:26 +0100
Jürgen Hestermann <juergen.hestermann at gmx.de> wrote:

> Am 2015-12-13 um 16:52 schrieb Ondrej Pokorny:
>  > The escape key selects mrCancel now (this was changed) -
> 
> I am not sure I understand this right.
> Does it mean, mrCancel needs to be
> checked too in a case statement like this?
> 
> case QuestionDlg('COPYING',
>                   'Abort?',
>                   mtConfirmation,
>                   [mrNo, '&No','IsDefault',
>                   mrYes,'&Yes'],0) of
>     mrYes : ...
>     mrNo : ...
>     end; // of case
> 
> Can the result be mcCancel even when it's not part
> of the parameter list of the QuestionDlg function?

Yes. Many widgetsets support an Escape key and/or have a close button.
That's why there is the 'IsCancel' option to redirect the cancel
to a button of your choice.

I fixed the case where a button is 'IsDefault' and 'IsCancel'.


Mattias




More information about the Lazarus mailing list