Ver Mensaje Individual
  #8  
Antiguo 26-01-2020
Avatar de escafandra
[escafandra] escafandra is offline
Miembro Premium
 
Registrado: nov 2007
Posts: 2.197
Reputación: 20
escafandra Tiene un aura espectacularescafandra Tiene un aura espectacular
Cita:
Empezado por compuin Ver Mensaje
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
    { Private declarations }
  public
    { Public declarations }
  end;


Pero luego tienes que is al editor de eventos igualmente para que quede asignado dicho evento.




Saludos.
Responder Con Cita