[lazarus] Tab generates error
tony at maro.net
Tue Sep 23 01:50:38 EDT 2003
This is odd...
Doubleclicking a control generates three events in this order:
This causes me grief because if I use setfocus during the dblclk event,
the next buttonup event will set the focus to NO control, despite the
fact that I'm not setting focus within the event handler. What then
happens is that if you hit tab after a doubleclick on the TCheckbook
control, the program crashes saying that you can't focus an invisible
control. The crash is generated by the TControl.Tabhandler or something
like that... not by my code directly.
I've added a workaround to detect if I'm getting the duplicate buttonup
message immediately following the doubleclick, and set a focus within
that event to the control I want.
More information about the Lazarus