Cita:
Empezado por compuin
Aqui la declare
procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
private
{ Private declarations }
|
En el IDE debes ir a Eventos del TSringGrid y buscar
OnDrawCell Haces dobleclick y se abrirá en el editor de código con la función preparada para escribir. Allí pega el código que puse. Si lo haces "a mano" No debes poner
Form1.
Código Delphi
[-]
TForm1 = class(TForm)
StringGrid1: TStringGrid;
StringGrid2: TStringGrid;
procedure FormCreate(Sender: TObject);
procedure StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
procedure StringGrid2DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
private
public
end;
Pero luego tienes que is al editor de eventos igualmente para que quede asignado dicho evento.
Saludos.