[Lazarus] Focused/Active control

Alexandrov Alexandru alexandru.alexandrov at gmail.com
Fri Jan 16 14:05:53 CET 2015


Hi Torsten,

Every form have an ActiveControl.
Only the ActiveControl of the ActiveForm get focus.. when the application
is active.

2015-01-16 13:16 GMT+02:00 Torsten Bonde Christiansen <tc at epidata.info>:

>  Hi.
>
> In a single form application, is it always the case that
> TForm.ActiveControl = "Focused Control" ?
>
> Eg. if I somewhere in my coded has:
>
> ...
> SomeWinControl.SetFocus;
> ...
>
> And the later do a check:
>
> ...
> if (MainForm.ActiveControl = SomeWinControl) then
> ...
>
> will the above if statement be true (considering focus hasn't changed)?
>
> Kind regards,
> Torsten.
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>


-- 
Alexandrov Alexandru,
tel. 0732-378-682
tel. 0743-586-614
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150116/3fd88507/attachment-0003.html>


More information about the Lazarus mailing list