Tema: Dbgrid
Ver Mensaje Individual
  #1  
Antiguo 19-07-2012
Victorialerda Victorialerda is offline
Registrado
NULL
 
Registrado: jul 2012
Posts: 8
Reputación: 0
Victorialerda Va por buen camino
Dbgrid

Queremos pintar una fila en un dbgrid con este código:

Código Delphi [-]
private
    { Private declarations }
    UnColor:TColor;

procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
  DataCol: Integer; Column: TColumn; State: TGridDrawState);
const 
  clPaleGreen = TColor($CCFFCC);
  clPaleRed =   TColor($CCCCFF);
begin 
    if Column.Field.Dataset_AGENDA.FieldbyName('HORA').AsInteger < 5
      then 
       if (gdFocused in State) then 
          dbgrid_RECORDATORIOS.canvas.brush.color := clBlack
        else 
           dbgrid_RECORDATORIOS..canvas.brush.color := clPaleGreen;
            dbgrid_RECORDATORIOS..DefaultDrawColumnCell(rect,DataCol,Column,State)
end;

y nos tira error q undelared identifier. 'ibsataset:agenda'. a lo entendido como que no esta identificada y lo declare en el uses y igual me tira el error. ¿alguna solucion para este problema?
gracias.

Última edición por Casimiro Noteví fecha: 19-07-2012 a las 17:30:36. Razón: Poner etiquetas [delphi] [/delphi]
Responder Con Cita