On 08.05.2017 17:42, Michael Van Canneyt via Lazarus wrote:
Hi, How can I respond to keyboard events in a TCustomControl (and hence TWinControl) descendent ? I have asigned the various OnKey* events handlers but they are not called. My control also does not seem to receive focus when clicked, I assume this is why it doesn't get keyboard events either ?
Yep
Is there something that must be called/set when creating the control to make it receive focus ?
Just to be sure that control actually can take focus put this ControlStyle := ControlStyle - [csNoFocus]; into constructor of your control. z. -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus-ide.org/listinfo/lazarus
