0

I need to change the colour of a cell, in a TCalendar component on Delphi2010.

i want to input a date from a database(adotable) and color that cell red if that helps i just im still a beginner so the simplest way is best

Ken White
  • 123,280
  • 14
  • 225
  • 444
  • AFAIK, `TCalendar` does not directly support what you are asking for. Being a `TCustomGrid` descendant, you will likely have to derive a new class from `TCalendar` and override its virtual `DrawCell()` and/or `DrawCellBackground()` method. – Remy Lebeau Aug 04 '20 at 00:17
  • That TCalendar component has been around since Delphi 1, and was an example of how to create components (that's why it's on the Samples palette page). You're much better off using the modern TCalendarView component, which will do what you're asking. – Ken White Aug 04 '20 at 00:19
  • I outlined a solution in https://stackoverflow.com/questions/62912484/is-there-a-way-to-highlight-cell-s-in-a-tcalendar. See the comments to the A. – Andreas Rejbrand Aug 04 '20 at 06:26

0 Answers0