TTMMSFMXCalendar -> OnMouseDown is not triggered

Hi,

I assign an event handler to an instance of TTMSFMXCalendar on the OnMouseDown event and is not triggered. Do you know why?

Thnaks
I found the bug on the component :

procedure TTMSFMXCalendar.CalendarDateMouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Single);
begin
//  SetFocus;
  FMouseDown := True;
  FFirst := True;
end;

You need to change to :

procedure TTMSFMXCalendar.CalendarDateMouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Single);
begin
//  SetFocus;
  FMouseDown := True;
  FFirst := True;
  if Assigned(OnMouseDown) then OnMouseDown(Sender, Button, Shift, X, Y);
end;

Hi,


You are actually redirecting the mousedown implementation on a date object, not on the calendar itself.
As the calendar exists out of multiple parts, there is currently no unified way to redirect the OnMouseDown, which is the reason why the OnMouseDown is not triggered. To have a OnMouseDown on the header for example, you would write the following code in the constructor:



  TMSFMXCalendar1.NeedStyleLookup;
  TMSFMXCalendar1.ApplyStyleLookup;
  TMSFMXCalendar1.GetHeader.OnMouseDown := DoHeaderMouseDown;