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
This commit is contained in:
wp_xxyyzz
2023-03-01 12:28:54 +00:00
parent beeab95b4a
commit 2a3ae05a7b

View File

@@ -89,7 +89,7 @@ type
coBoldWeekend, coDayLine, coShowBorder, coShowHolidays, coBoldWeekend, coDayLine, coShowBorder, coShowHolidays,
coShowTodayFrame, coShowTodayName, coShowTodayRow, coShowTodayFrame, coShowTodayName, coShowTodayRow,
coShowWeekend, coShowDayNames, coShowTopRow, coUseTopRowColors, coShowWeekend, coShowDayNames, coShowTopRow, coUseTopRowColors,
coNoMonthChange coNoMonthChange, coNoOtherMonthDays
); );
TCalOptions = set of TCalOption; TCalOptions = set of TCalOption;
@@ -967,6 +967,12 @@ begin
if Assigned(FOwner.FOnPrepareCanvas) then if Assigned(FOwner.FOnPrepareCanvas) then
FOwner.FOnPrepareCanvas(FOwner, FCanvas, y, m, d, state); 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; continueDrawing := true;
if Assigned(FOwner.FOnDrawCell) then if Assigned(FOwner.FOnDrawCell) then
{ Custom-draw the cell } { Custom-draw the cell }