TRzCalendar Cell Colours.

Viewing 2 reply threads
  • Author
    Posts
    • #2467
      Steve Gill
      Participant

        Hi Ray,

        Is it possible to individually change the colour (color) of individual date cells in TRzCalendar?

        I’m using TRzCalendar as part of an appointment system and I’d like to make the date cells a different colour where there are appointments on those dates.

        Thanks,

        Steve

         

      • #2480
        Ray Konopka
        Keymaster

          Hi Steve,

          So sorry for the long delay. I hope you were able to locate the OnGetDayFormat event, which allows you to do what you wish. For example, the following event handler colors May 4 green in honor of Grogu (Baby Yoda).

          procedure TForm7.RzCalendar1GetDayFormat(Sender: TObject; DayDate: TDateTime; Year, Month, Day: Word; var DayColor,
            DayFontColor: TColor; var DayFontStyle: TFontStyles);
          begin
            if ( Month = 5 ) and ( Day = 4 ) then
            begin
              DayColor := clGreen;
              DayFontColor := clWhite;
            end;
          end;
          

          Ray

        • #2482
          Steve Gill
          Participant

            Hi Ray,

            Yep, I worked in out.

            Thanks,

            Steve

             

        Viewing 2 reply threads
        • You must be logged in to reply to this topic.