Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > OOP
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #6  
Antiguo 01-06-2006
CamiloU CamiloU is offline
Miembro
 
Registrado: dic 2005
Ubicación: Sincelejo - COlombia
Posts: 59
Poder: 21
CamiloU Va por buen camino
Segui el procedimiento que encontre en otro hilo, pero no me funciona. Me podrían indicar donde esta el error. Anexo el codigo.

Código Delphi [-]
procedure TComPagoDetalleACD.IngresosDrawCell(Sender: TObject; ACol,
  ARow: Integer; Rect: TRect; State: TGridDrawState);
begin
   if ACol = 0 then
      Display(Ingresos, Ingresos.Cells[ACol,ARow], taCenter);
  if ACol = 2 then
      Display(Ingresos, Ingresos.Cells[ACol,ARow], taRightJustify);
end;

procedure TComPagoDetalleACD.WriteText(StringGrid: TStringGrid; ACanvas: TCanvas; const ARect: TRect;
     const Text: string; Format: Word);
const
  DX = 2;
  DY = 2;
var
  S: array[0..255] of Char;
begin
  with Stringgrid, ACanvas, ARect do
    begin
      case Format of
          DT_LEFT: ExtTextOut(Handle, Left + DX, Top + DY,
             ETO_OPAQUE or ETO_CLIPPED, @ARect, StrPCopy(S, Text), Length(Text), nil);
          DT_RIGHT: ExtTextOut(Handle, Right - TextWidth(Text) - 3, Top + DY,
             ETO_OPAQUE or ETO_CLIPPED, @ARect, StrPCopy(S, Text),
             Length(Text), nil);
          DT_CENTER: ExtTextOut(Handle, Left + (Right - Left - TextWidth(Text)) div 2,
             Top + DY, ETO_OPAQUE or ETO_CLIPPED, @ARect,
             StrPCopy(S, Text), Length(Text), nil);
      end;
    end;
end;

procedure TComPagoDetalleACD.Display(StringGrid: TStringGrid; const S: string; Alignment: TAlignment);
const
  Formats: array[TAlignment] of Word = (DT_LEFT, DT_RIGHT, DT_CENTER);
begin
  WriteText(StringGrid, StringGrid.Canvas, B, S, Formats[Alignment]);
end;


Muchas Gracias.
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
alineacion de un memo Choclito Varios 5 02-05-2006 08:24:46
StringGrid, colores y alineación Alexander Varios 5 17-11-2005 01:15:11
Alineación en Edit rbeltran Varios 1 28-01-2005 17:01:11
Alineación de controles roman OOP 9 24-08-2004 00:00:57
alineacion de 2 StringGrid miguel_fr OOP 6 17-06-2004 15:50:09


La franja horaria es GMT +2. Ahora son las 19:47:12.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi