Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

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

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #2  
Antiguo 26-07-2016
Avatar de BDWONG
BDWONG BDWONG is offline
Miembro
NULL
 
Registrado: nov 2013
Posts: 113
Poder: 11
BDWONG Va por buen camino
Hola buscando me econtre un enlace donde muestra como pintar una celda en especifico aqui te lo dejo http://stackoverflow.com/questions/6...in-string-grid


La prueba esta hecha en Lazarus 1.6 pero seguro servira igual en Delphi
Bueno y en base a la respuesta del usuario @RRUZ pues hize esto:

Código Delphi [-]
procedure TForm1.StringGrid1DrawCell(Sender: TObject; aCol, aRow: Integer;
  aRect: TRect; aState: TGridDrawState);
var
  i,j:Integer;
begin

  if (ACol >=1) and (ARow =StringGrid1.Row) then
    with TStringGrid(Sender) do
    begin
      //paint the background Green
      Canvas.Brush.Color := clBlue;
      Canvas.FillRect(aRect);
      Canvas.TextOut(aRect.Left+2,aRect.Top+2,Cells[ACol, ARow]);
    end;

  if (ACol = StringGrid1.Col) and (ARow = StringGrid1.Row) then
    with TStringGrid(Sender) do
    begin
      //paint the background Green
      Canvas.Brush.Color := clYellow;
      Canvas.FillRect(aRect);
      Canvas.TextOut(aRect.Left+2,aRect.Top+2,Cells[ACol, ARow]);
    end;
end;

Ejemplo:
https://www.youtube.com/watch?v=x5kb...ature=youtu.be
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

Temas Similares
Tema Autor Foro Respuestas Último mensaje
como ver un tipo de datos de una grilla en otra grilla en el mismo form? calistian Varios 5 01-10-2008 19:29:04
La Grilla YOSMITH Gráficos 1 13-06-2007 22:11:50
Coleres en las Grilla josem Varios 6 06-06-2007 20:05:15
Grilla :-( AndyLupa Varios 0 20-04-2006 15:51:18
bandas en grilla Andrea Martinez Varios 0 10-07-2004 06:42:22


La franja horaria es GMT +2. Ahora son las 22:36:36.


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