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;
Add Types