Chamar evendo onDrawCell em runtime

18/11/2009

0

Bon dia!    Estou precisando de uma ajuda, para o seguinte problema:   Estou criando uma Stringgrid em runtime, mas quero poder chamar o evendo OnDrawCell, e nao sei que parametro uso para poder chamar o procedimento "procedure TFrm_ENC.DBGDrawCell(Sender: TObject; ACol, ARow: Integer;
  Rect: TRect; State: TGridDrawState);" atraves do evento SG3.OnDrawCell criadao em runtime, nao sei se fui claro na minha explicacao...     procedure TFrm_ENC.DBG2(Sender: TObject);
var   .....
begin   SG3:=TStringGrid.Create(Self);   SG3.Parent:=Panel2;   SG3.Align:=AlNone;   SG3.Anchors := [akTop,akRight];   SG3.Color := clSkyBlue;   .   .   SG3.Font.Size := 12;   SG3.OnDrawCell := ; end;     procedure TFrm_ENC.DBGDrawCell(Sender: TObject; ACol, ARow: Integer;
  Rect: TRect; State: TGridDrawState);
begin
.
.
end;
Claudio Francisco

Claudio Francisco

Responder

Posts

04/02/2010

Wilson Junior

procedure TFrm_ENC.DBG2(Sender: TObject);
var   .....
begin   SG3:=TStringGrid.Create(Self);   SG3.Parent:=Panel2;   SG3.Align:=AlNone;   SG3.Anchors := [akTop,akRight];   SG3.Color := clSkyBlue;   .   .   SG3.Font.Size := 12;   SG3.OnDrawCell := DBGDrawCell; end;     procedure TFrm_ENC.DBGDrawCell(Sender: TObject; ACol, ARow: Integer;
  Rect: TRect; State: TGridDrawState);
begin
.
.
end;


Espero ter colaborado.
Responder

Que tal ter acesso a um e-book gratuito que vai te ajudar muito nesse momento decisivo?

Ver ebook

Recomendado pra quem ainda não iniciou o estudos.

Eu quero
Ver ebook

Recomendado para quem está passando por dificuldades nessa etapa inicial

Eu quero

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar