[Lazarus] An expression is returning false, why?

zeljko zeljko at holobit.net
Mon Mar 5 08:53:08 CET 2018

On 03/04/2018 09:48 PM, Lubos Pintes via Lazarus wrote:
> Hello and thank for a reply. Do I understand correctly that a form is a 
> special case?
> What about TEdit or TButton for example? I am encapsulating a TControl 
> instance and am asking for properties needed for UI Automation, 
> occasionally asking if the encapsulated control is a TWinControl instance.
> I tested the simplest LCL program, just an empty form, and it really 
> caused me headache. I just forcefully set the HasKeyboardFocus property 
> to true for testing and the form was reported correctly.

Use MyForm.ActiveControl to get focused control on active form.


More information about the Lazarus mailing list