Search code examples
delphifiremonkeydelphi-10.2-tokyo

How to hide components when clicking outside your area


I have a form with green edit, when the user clicks the search button, the components in red are displayed on the screen. But I want that when the user clicks out of the component area, they disappear. I have no idea how to do this. I saw some people using a layout to cover the whole screen, but wanted to know if there was another way.

enter image description here


Solution

  • Or use the OnFormclick event with object.visible:=false;