Ver Mensaje Individual
  #27  
Antiguo 06-08-2010
[FGarcia] FGarcia is offline
Miembro Premium
 
Registrado: sep 2005
Ubicación: Cordoba, Veracruz, México
Posts: 1.123
Reputación: 20
FGarcia Va por buen camino
Bueno, pues ya corregi tal cual me comentaste y al parecer ya esta listo.

Código Delphi [-]
//Aqui Pintamos las columnas de los horarios del segundo turno
  procedure _PaintHourCol3(ACol,ARow:integer);
  var
    a,j,p:integer;
    Str:String;
  begin
    if (ACol=3) and (ARow <10) then   //Ignoro la fila de resumen
      begin
        a := ARow + 14 - 2; //14 es la hora de inicio
                                   //Restamos los dos renglones o filas fijos
        Str := Format('%.2d:00',[a]) + ' - ' + Format('%.2d:00',[a+1]);
      end; //if

    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); //FillRect(Rect);
        Application.ProcessMessages;
        StringGrid1.Canvas.TextOut(Rect.Left + 5,Rect.Top + 3, Str);
        Application.ProcessMessages;
      end;
  end;

//Para el tercer turno (Columna 6) hice una chapuza HORRIBLE pero por el momento me resuelve el problema
//Aqui Pintamos las columnas de los horarios del tercer turno
  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  //Ignoro la fila de resumen
      begin
        InflateRect(Rect, -1, -2);

        StringGrid1.Canvas.Pen.Color := clBlack;
        StringGrid1.Canvas.Brush.Style := bsSolid;
        StringGrid1.Canvas.Brush.Color := $00E6E6E6;
        StringGrid1.Canvas.Rectangle(Rect); //FillRect(Rect);
        Application.ProcessMessages;
        StringGrid1.Canvas.TextOut(Rect.Left + 5,Rect.Top + 3, Str);
        Application.ProcessMessages;
      end;
  end;
Imágenes Adjuntas
Tipo de Archivo: jpg Rejilla3.jpg (51,6 KB, 37 visitas)
__________________
ESTO ES UN FORO ... NO UN MÓVIL
¿Por qué no escribir de una manera comprensible para que los humanos lo podamos entender?
Responder Con Cita