Bart schrieb:
On 4/22/12, Bart <[email protected]> wrote:
If you have a modern Delphi (as in higher then D3) could you please test
this.
Put a TBitBtn on a form.
Set Kind = bkClose (in OI)
Set Modalresult = mrClose (in OI)
ShowModal this form
Click on this TBitBtn
What is the value Modalresult: mrCancel or mrClose?
Bart
I had someone with Delphi XE test this for me. Delphi returns mrClose
in this case, so I think this is LCL bug.
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.
DoDi
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus