From 2a3ae05a7bdbd62999d9e2228ba02181b9431d78 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Wed, 1 Mar 2023 12:28:54 +0000 Subject: [PATCH] calLite: Add option coNoOtherMonthDays to suppress painting the days of the adjacent months in the calendar. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8755 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/callite/source/calendarlite.pas | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/callite/source/calendarlite.pas b/components/callite/source/calendarlite.pas index 8e31f51c7..25efbcfe4 100644 --- a/components/callite/source/calendarlite.pas +++ b/components/callite/source/calendarlite.pas @@ -89,7 +89,7 @@ type coBoldWeekend, coDayLine, coShowBorder, coShowHolidays, coShowTodayFrame, coShowTodayName, coShowTodayRow, coShowWeekend, coShowDayNames, coShowTopRow, coUseTopRowColors, - coNoMonthChange + coNoMonthChange, coNoOtherMonthDays ); TCalOptions = set of TCalOption; @@ -967,6 +967,12 @@ begin if Assigned(FOwner.FOnPrepareCanvas) then FOwner.FOnPrepareCanvas(FOwner, FCanvas, y, m, d, state); + if (coNoOtherMonthDays in FOwner.Options) and (csOtherMonth in state) then + begin + dt := dt + 1; + continue; + end; + continueDrawing := true; if Assigned(FOwner.FOnDrawCell) then { Custom-draw the cell }