[Lazarus] Is TForm.LastActiveControl working correctly?

frans fjf.vanleeuwen at quicknet.nl
Sun Dec 6 12:22:13 CET 2020


I'm using Lazarus 2.0.10 on Windows10 and I'm trying to make use of 
My form has a TButtonpanel with HelpButton and CancelButton visible. 
There is an Actionlist with 2 actions, each with a Shortcut (F1 and 
Esc). The form has 3 TLabeledEdit fields.
My purpose is that the field that has the focus keeps that (I do that in 
the FormOnActivate routine) after calling Help by clicking on the 
HelpButton.  But that is not the case, the focus is placed on that 
I added some debug lines to check the value of ActiveControl and 
LastActiveControl in an OnEnter and OnExit routine for each field. The 
result is that every action I take (use tab of mouse to activate another 
control) gives the same result: ActiveControl and lastActiveControl 
allways point to the same control.

Is this a bug or is my understanding of lastActiveControl wrong?

Frans van Leeuwen
M 06-51695390

Deze e-mail is gecontroleerd op virussen door AVG.

More information about the lazarus mailing list