On 08.05.2017 17:42, Michael Van Canneyt via Lazarus wrote:
Is there something that must be called/set when creating the control
to make
it receive focus ?
If you mean receiving focus by clicking on it then yes, you need to call
SetFocus in MouseDown. It's also a good idea to check the csNoFocus flag
(from ControlStyle property).
For an example look how it is done in TCustomDBGrid.MouseDown.
+ The control can always get focused by the Tab key, if TabStop=True.
Ondrej
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus