TTMSFNCCalendar: Weekend Colour.

Is it possible to display the weekend days (ie. Saturday and Sunday) in a different colour than the other days like TPlannerCalendar?

= Steve

procedure TForm1.TMSFNCCalendar2AfterDrawDayNumbers(Sender: TObject;
  AGraphics: TTMSFNCGraphics; ARect: TRectF; ADate: TDate);
begin
  //saturday
  if (DayOfWeek(ADate)=7) and not TMSFNCCalendar2.SelectedDates.InCollection(ADate) then
  begin
    AGraphics.Fill.Color:=clGreen;
    AGraphics.DrawRectangle(ARect);
  end;
  //sunday
  if (DayOfWeek(ADate)=1) and not TMSFNCCalendar2.SelectedDates.InCollection(ADate) then
  begin
    AGraphics.Fill.Color:=clRed;
    AGraphics.DrawRectangle(ARect);
  end;
end;



Awesome.  Thanks Dmitruk!

= Steve
Hmm, strange.  Delphi reports that TRectF is an undeclared identifier, yet VCL.TMSFNCTypes is in the Uses clause.

= Steve

Add Types



Thanks Bruno.  I thought I already had that but you're right, it wasn't there.

= Steve