<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">On Sun, Dec 6, 2020 at 1:22 PM frans via lazarus <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">ActiveControl and lastActiveControl always point to the same control.<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Is this a bug or is my understanding of lastActiveControl wrong?<br></blockquote><div><br></div><div>That is how it is implemented. It is set to ActiveControl unless ActiveControl is Nil or a TCustomForm.</div><div>  if (FActiveControl<>nil) and not (FActiveControl is TCustomForm) then<br></div><div><div>    FLastActiveControl := FActiveControl;</div></div><div><br></div><div>I did not know about LastActiveControl. What is the use of it? TScreen class seems to have it, too.</div><div>Anyway, you can easily keep track of the previous ActiveControl in your code yourself.</div><div><br></div><div>Regards,</div><div>Juha</div><div><br></div></div></div></div></div></div></div></div></div>