![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
![]() |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#1
|
|||
|
|||
|
Hola amigos:
Como puedo hacer para que la fila seleccionada en un dbgrid cambie de color Gracias... |
|
#2
|
||||
|
||||
|
Dale una mirada a este hilo: http://www.clubdelphi.com/foros/showthread.php?t=5455
|
|
#3
|
|||
|
|||
|
Cita:
|
|
#4
|
||||
|
||||
|
El hilo al que te refieres meciona como pintar una fila independientemente de condición o no. De ahí pasar a pintar una fila en otro tipo de situaciones no debe presentar mayores problemas.
Ahora bien, ¿a qué te refieres con "fila nueva"? // Saludos |
|
#5
|
||||
|
||||
|
Hola, MITOPE.
Prueba este código a ver si te sirve Código:
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
var
Num: Integer;
R: TRect;
begin
Num:=TStringGrid(DBGrid1).Row;
R:=TStringGrid(DBGrid1).CellRect(DataCol,Num);
if R.Top=Rect.Top then
with DBGrid1 do
begin
if (gdFocused in State) then
Canvas.Font.Color:=clWhite
else
Canvas.Font.Color:=clRed;
Canvas.Font.Style:=[fsBold];
DefaultDrawColumnCell(Rect,DataCol,Column,State);
end;
end
![]()
__________________
Lo importante no es saber, sino tener el e-mail del que sabe. |
![]() |
|
|
|