bgrabitmap / bgracontrols

🆗 BGRA Controls is a set of graphical UI elements that you can use with Lazarus LCL applications.
https://bgrabitmap.github.io/bgracontrols/
189 stars 32 forks source link

BCButtonFocus bug #100

Closed lainz closed 1 year ago

lainz commented 3 years ago

I use TBCButtonFocus from BGRA Button Controls. I noticed that if I call ShowMessage in button's OnClick event and press Enter key to close ShowMessage (or some other dialog, ShowMessage is just an example), OnClick event is fired again.

Is this a bug or a feature?

I attached example project that shows this behaviour. BCButtonFocus_test.zip

From dseligo, original thread https://forum.lazarus.freepascal.org/index.php/topic,53326.msg394314.html#msg394314

lainz commented 3 years ago

It's strange, because the same code is used for spacebar and enter keys, and with spacebar there is no problem, it works fine. Maybe there is some hidden LCL code that triggers the click again...