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
  #2  
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
Primero que nada quiero pedirte disculpa por mi falta de conocimiento (No se que es una aplicación CLX ), pero quizás el truco 234 de Trucomanía te pueda ayudar, a continuación te lo cito.

Cita:
Empezado por Trucomanía
Pon este código en el evento OnDrawCell de tu StringGrid:

Código Delphi [-]
procedure TForm1.StringGrid1DrawCell(Sender: TObject; Col, Row: Integer;
  Rect: TRect; State: TGridDrawState);
var sCad:String;
    i:integer;
    bEsNum:Bool;
begin 
  if StringGrid1.Cells[Col,Row] <> '' then 
  begin 
     bEsNum := True;
     sCad := StringGrid1.Cells[Col,Row];
     for i:=1 to length(sCad) do 
         if not (sCad[i] in ['0'..'9','-']) then bEsNum := False;
     if bEsNum then 
     begin 
        {'%15 para una longitud maxima de 15 caracteres}
        {'%15 for a Max Length of 15 characteres}
        sCad := Format('%15.0n',[StrToFloat(StringGrid1.Cells[Col,Row])]);
        with StringGrid1 do 
          with Canvas,Rect do 
          begin 
             i:=Right-TextWidth(sCad+' ');
             Canvas.FillRect(Rect);
             Canvas.TextOut(i,Top+2,sCad);
          end; 
     end; 
  end; 
end;
Espero que eso te pueda ayudar.

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 08:39:36.


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