DrawCell过程作如下修改就可以看清楚当天了. procedure ThxCalendar.DrawCell(ACol, ARow: Longint; ARect: TRect; AState: TGridDrawState); var HzDate:THzDate; TheText,ry,dz,hzdaystr,sf: string; MyDate:tdate; begin TheText := CellText[ACol, ARow]; if TheText='' then exit; //没有内容时跳出 if ARow=0 then //写表头的星期几的汉字 begin Font.Color :=clBlue; Canvas.TextRect(ARect, ARect.Left + 15, ARect.Top +10, TheText); exit; end; MyDate := EncodeDate(year, month, strtoint(TheText)); HzDate := ToLunar(MyDate); //算出农历日期 dz:= GetJQ(MyDate); //取得指定日期的节气汉字串 if dz = '' Then if HzDate.Day = 1 then ry:=FormatLunarMonth(HzDate.Month,HzDate.isLeap) else ry := FormatLunarDay(Hzdate.Day); sf :=GetsFtv(MyDate)+GetlFtv(hzDate); //取得新历节日及农历节日 with ARect, Canvas do begin if Day=strtoint(TheText) then //选择的当天背景色 begin Canvas.Brush.Color:=clSkyBlue; Canvas.FillRect(ARect); end; if dz<>'' then //节气的当天 begin Font.Color := clRed; //节气字串,红色 TextRect(ARect, Left +2, Top +2, TheText+sf); TextOut(Left + Font.Size+10, Top + 20, dz); exit; end; if sf='' then Font.Color :=clBlue //非节日字串,蓝色 else Font.Color :=clRed; //节日字串,红色 TextRect(ARect, Left + 2, Top +2, TheText+sf); //上行,公历日期字串 Font.Color :=clblack; //农历字串,黑色 TextOut(ARect.Left + Font.Size+10, ARect.Top + 20, ry); //下行,农历汉字 end; end;