How to detect the mouse click outside the component? I'm making custom calendar and when clicking the TLabel with presented date - the TCalendar is appearing. It's working. But I want to disappear the TCalendar when mouse is outside the component and button is pressed? In VCL I might use the WindowsMessages, but there is a Firemonkey and I want to use it at iOS too.
BR
OnExit
event. Alternatively, when showing the Calendar, you might try calling its protectedCapture()
method (or set itsAutoCapture
property to true) so it captures all mouse events. – Remy LebeauOnExit
event. It is inherited fromTControl
. AndOnExit
is definitely published inTCalendar
. Check the declaration ofTCalendar
inFMX.Calendar.pas
for yourself, you will see this is true:TCalendar = class(TCustomCalendar) published ... { Events } property OnExit; ... end;
– Remy Lebeau