[Lazarus] TBitBtn with Kid=bkClose and ModalResult

Bart bartjunk64 at gmail.com
Tue Apr 24 09:28:09 CEST 2012


On 4/23/12, Hans-Peter Diettrich <DrDiettrich1 at aol.com> wrote:

> Here it returns mrCancel by default. When the ModalResult of the button
> is specified, this value is returned. On close with "X" the result is
> always mrCancel.
>
> Not worth to mimic this inconsistent behaviour in the LCL, IMO.
> Older Delphi code also will be fooled when mrClose is returned, which
> has been introduced only after D7.

Not sure what your last statement actually means:
a) LCL should return mrClose if TBitBtn.Modalresult = mrClose, even if
TBitBtn.Kind = bkClose
b) LCL should not return mrClose, since D7 (and earlier) does not support that.

?

Bart




More information about the Lazarus mailing list