Ver Mensaje Individual
  #2  
Antiguo 29-08-2011
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Reputación: 36
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
Hola ramonibk.

Este código debería pintarte las celdas que son acordes con el dia y mes de las fechas cargadas en LstFechas:
Código Delphi [-]
...
implementation

uses DateUtils;

var
  LstFechas : TStrings;
  MesActual : Integer;

...

procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
  Rect: TRect; State: TGridDrawState);
var
  i: Integer;
begin
  for i:= 0 to LstFechas.Count-1 do
    with StringGrid1 do
    begin
      if (MonthOf(StrToDate(LstFechas[i])) = MesActual) and
         (StrToInt(Cells[ACol,ARow])= DayOf(StrToDate(LstFechas[i]))) then
      begin
        Canvas.Brush.Color:= clRed;
        Canvas.Font.Color:= clWhite;
        Canvas.FillRect(Rect);
        Canvas.TextOut(Rect.Left,Rect.Top,Cells[ACol,ARow]);
      end;
    end;
end;

Saludos.
__________________
Daniel Didriksen

Guía de estilo - Uso de las etiquetas - La otra guía de estilo ....
Responder Con Cita