Completely remove the focus from a form lazarus / 31-LCL ---------------------------------------------------------------------- simone · 2021-12-02 23:37 Is it possible to completely remove the focus from a form? In other words, I want a form without any controls with the active focus. I found this old issue: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/25396 which reports that TForm.ActiveControl: = nil is not working. It seems to me that the problem has not been solved. Do you have any suggestions? Thanks. ---------------------------------------------------------------------- trev · 2021-12-02 23:51 Quote from: simone on December 03, 2021, 12:37:56 am I want a form without any controls with the active focus. Set the tabstop property of the controls to false. Works for me. ---------------------------------------------------------------------- simone · 2021-12-03 14:36 Thanks Trev, your solution works. The only drawback, if I understand correctly, is that I have to set TabStop to False in every control that can receive the focus. I tried under Windows. Do you know if it also works with other widgets? ---------------------------------------------------------------------- jamie · 2021-12-03 16:04 What does the "Disable" property do for you ? I assume the form does have one. ---------------------------------------------------------------------- simone · 2021-12-03 16:26 I did not understand your answer. Which 'disable' property are you referring to? ---------------------------------------------------------------------- jamie · 2021-12-03 16:28 The form has a "Enabled" property, that disallows input. ---------------------------------------------------------------------- simone · 2021-12-03 16:52 You wrote 'disable', not 'enabled'. For this I did not understand.  Thank you for your suggestion.  I can't prove it now.  But in this way I disable mouse and key input for the form and the controls inside it? ---------------------------------------------------------------------- jamie · 2021-12-03 18:12 Yup ---------------------------------------------------------------------- trev · 2021-12-03 20:10 Quote from: simone on December 03, 2021, 03:36:01 pmThanks Trev, your solution works. [...]I tried under Windows. Do you know if it also works with other widgets? Works for me in Cocoa and GTK2.