Thema: Delphi TstringGrid Problem

Einzelnen Beitrag anzeigen

donmarkus

Registriert seit: 21. Dez 2006
14 Beiträge
 
#5

Re: TstringGrid Problem

  Alt 24. Jan 2007, 19:33
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, StdCtrls, ImgList,Types, Menus;

Code:
procedure TMines.Button1Click(Sender: TObject);
var bm: TBitmap;
begin
  if Sender <> NIL then
  with Sender as TStringGrid do
  begin
    bm := TBitmap.Create;
    try
      ImageList1.GetBitmap(0, bm);
      Canvas.Draw(Rect.Left + 5, Rect.Top + 5, bm);   //hier kommt die oben genannte fehlermeldung
    finally
      FreeAndNil(bm);
    end;
  end;
end;
wie gesagt will ich in eine Zelle ein kleines bildchen einfügen.Eine Imagelist habe ich erstellt.
  Mit Zitat antworten Zitat