Bueno, pues ya corregi tal cual me comentaste y al parecer ya esta listo.
Código Delphi
[-]
procedure _PaintHourCol3(ACol,ARow:integer);
var
a,j,p:integer;
Str:String;
begin
if (ACol=3) and (ARow <10) then begin
a := ARow + 14 - 2; Str := Format('%.2d:00',[a]) + ' - ' + Format('%.2d:00',[a+1]);
end;
if (ARow > 1) then
begin
InflateRect(Rect, -1, -2);
StringGrid1.Canvas.Pen.Color := clBlack;
StringGrid1.Canvas.Brush.Style := bsSolid;
StringGrid1.Canvas.Brush.Color := $00E6E6E6;
StringGrid1.Canvas.Rectangle(Rect); Application.ProcessMessages;
StringGrid1.Canvas.TextOut(Rect.Left + 5,Rect.Top + 3, Str);
Application.ProcessMessages;
end;
end;
procedure _PaintHourCol6(ACol,ARow:integer);
var
a,j,p:integer;
Str:String;
begin
if (ACol=6) then
begin
case ARow of
2 : a := 22;
3 : a := 23;
4 : a := 0;
5 : a := 1;
6 : a := 2;
7 : a := 3;
8 : a := 4;
9 : a := 5;
end;
Str := Format('%.2d:00',[a]) + ' - ' + Format('%.2d:00',[a+1]);
end;
if (ARow > 1) and (ARow <10) then begin
InflateRect(Rect, -1, -2);
StringGrid1.Canvas.Pen.Color := clBlack;
StringGrid1.Canvas.Brush.Style := bsSolid;
StringGrid1.Canvas.Brush.Color := $00E6E6E6;
StringGrid1.Canvas.Rectangle(Rect); Application.ProcessMessages;
StringGrid1.Canvas.TextOut(Rect.Left + 5,Rect.Top + 3, Str);
Application.ProcessMessages;
end;
end;