Ver Mensaje Individual
  #6  
Antiguo 01-06-2007
Avatar de gluglu
[gluglu] gluglu is offline
Miembro Premium
 
Registrado: sep 2004
Ubicación: Málaga - España
Posts: 1.455
Reputación: 21
gluglu Va por buen camino
Gracias a los dos por vuestros comentarios.

Delphi 2006 VCL.Net, Proyecto nuevo VCL, un nuevo Form VCL. Incluyo un DBGrid y un Botón.

Código :

Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
  Proc : TDrawColumnCellEvent;
begin
 
  Proc := DBGrid1.OnDrawColumnCell;
  DBGrid1.OnDrawColumnCell := Proc;   // Aqui el compilador no me dá error
 
  DBGrid1.OnDrawColumnCell := nil;
  DBGrid1.OnDrawColumnCell := DBGrid1DrawColumnCell;  // Aquí el compilador me lanza el error
 
end;
 
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; Rect: TRect;
  DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
  DBGrid1.Font.Size := 8;
end;
Será de nuevo algo especial del Delphi VCL.Net como me he encontrado otras varias ya.

Gracias por la idea de la variable intermedia.
__________________
Piensa siempre en positivo !
Responder Con Cita