Fórum Alterar a cor de somente uma célula no string grid?????? #287681
12/07/2005
0
Colegas..
Estou precisando alterar a cor de somente uma célula no string grid, mas não estou conseguindo..
Já conseguí alterar a formatação do texto, mas a cor da célula não..
Alguém sabe como fazer isso?
Agradeço a todos antecipadamente.
Estou precisando alterar a cor de somente uma célula no string grid, mas não estou conseguindo..
Já conseguí alterar a formatação do texto, mas a cor da célula não..
Alguém sabe como fazer isso?
Agradeço a todos antecipadamente.
Cabelo
Curtir tópico
+ 0
Responder
Post mais votado
12/07/2005
No evento OnDrawCell:Modifique ACol e ARow conforme a célula.
if (ACol = 1) and (ARow = 2) then begin StringGrid1.Canvas.Brush.Color := clYellow; StringGrid1.Canvas.FillRect(Rect); StringGrid1.Canvas.TextOut(Rect.Left+2, Rect.Top+2, StringGrid1.Cells[1,2]); end;
Kapak
Responder
Gostei + 1
Mais Posts
12/07/2005
Cabelo
No evento OnDrawCell:Modifique ACol e ARow conforme a célula.
if (ACol = 1) and (ARow = 2) then begin StringGrid1.Canvas.Brush.Color := clYellow; StringGrid1.Canvas.FillRect(Rect); StringGrid1.Canvas.TextOut(Rect.Left+2, Rect.Top+2, StringGrid1.Cells[1,2]); end;
Funcionou perfeitamente
Muito Obrigado
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)