[Lazarus] intercepting keyboard events
Graeme Geldenhuys
mailinglists at geldenhuys.co.uk
Mon May 22 15:57:27 CEST 2017
On 2017-05-08 17:46, zeljko via Lazarus wrote:
> Just to be sure that control actually can take focus put this
> ControlStyle := ControlStyle - [csNoFocus];
> into constructor of your control.
And what if that doesn't work? I've set that in the constructor, but
still it doesn't receive keyboard focus (after I've clicked on the
custom control)?
What else can I try?
eg:
I have a PageControl which contains my custom control. I then have a
treeview on the right. If the treeview had focus, and I click on my
custom control and then press some keys (eg: Up/Down) then the focused
node in the treeview changes. Keyboard focus doesn't seem to want to
move to the custom control.
ps #2:
Interacting with a mouse on my custom control seems to work (but then
I have SetFocus in the MouseDown too).
Regards,
Graeme
More information about the Lazarus
mailing list