Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #5  
Antiguo 22-09-2004
Avatar de yusnerqui
yusnerqui yusnerqui is offline
Miembro
 
Registrado: mar 2004
Ubicación: Cuba
Posts: 679
Poder: 23
yusnerqui Va por buen camino
Esto Funciona

Como bien dice el amigo roman, se trata del mismo evento así que con solo unas pequeñas modificaciones lo podrás adaptar a lo que quieres.
Código Delphi [-]
procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
  Rect: TRect; State: TGridDrawState);
var sCad:String;
    i: integer;
begin 
  if ACol=2 then // voy a alinear a la derecha la 3ª columna
  if ARow>0 then //No quiero alinear la línea de títulos
    if StringGrid1.Cells[ACol,ARow] <> '' then 
    begin 
       sCad := StringGrid1.Cells[ACol,ARow];
         with StringGrid1 do 
            with Canvas,Rect do 
            begin 
               i:=Right-TextWidth(sCad+' ');
               Canvas.FillRect(Rect);
               Canvas.TextOut(i,Top+2,sCad);
            end;      
    end; 
end;


Esto lo probé y me funciona.

Espero te Ayude.

Un saludo
__________________
Lo importante no es llegar primero, sino saber llegar.

Para que puedas llegar mejor lee la Guia de Estilo

Responder Con Cita
 



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


La franja horaria es GMT +2. Ahora son las 20:05:41.


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