Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-01

Focused/Active control

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Torsten Bonde Christiansen

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150116/496a614b/attachment.html>

Reply by email

Alexandrov Alexandru
to Torsten Bonde Christiansen

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 :

Show quoted text 29 lines
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 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.freepascal.org/pipermail/lazarus/attachments/20150116/3fd88507/attachment.html>

Reply by email