Calling eventhandler by clicking anywhere inside frame lazarus / 10-Designer ---------------------------------------------------------------------- fpcoder · 2016-04-01 01:12 Lets say I have a TFrame with a few panels and some smaller controls. Now I want to click anywhere inside the frame, even on a child control, and have always the same event reacting and say: "Clicked!". (In reality, assign the frame to a CurrentFrame variable so I know what frame instance is selected) Is it necessary to assign the eventhandler to each and every control inside the frame, or is there another way to solve this? ---------------------------------------------------------------------- balazsszekely · 2016-04-01 03:39 Select all components on the frame, then create the event. This way you will have a single OnClick. I don't see why this should be a problem?  Another windows only solution is to hook the mouse. ---------------------------------------------------------------------- fpcoder · 2016-04-01 19:39 Thanks, I missed the obvious.  I was focused on stuff like keypreview which doesn't look for mouseclicks and that got me confused.