title: Delphi: Can't Draw On Panel's Canvas
body: <p>I'm trying to draw an image on a TPanel's Canvas in a procedure of this Panel. When I do this in Paint Method of the Panel it works just fine, but when I try to draw on the Canvas in another procedure or in the constructor nothing happens. </p>
  
  <p>This is how I draw on the Panel's Canvas in the Paint Procedure:</p>
  
  <pre><code>procedure TFeld.Paint;
  var bmp : TBitmap;
  begin
    inherited;
    bmp := TBitmap.Create;
    try
      bmp.LoadFromFile('textures\ground.bmp');
      self.Canvas.Draw(0,0,bmp);
    finally
      bmp.Free;
    end;
  end;
  </code></pre>
  
  <p>And this is how I try to draw on it in another procedure:</p>
  
  <pre><code>procedure TFeld.setUnsichtbar;
  var bmp : TBitmap;
  begin
    bmp := TBitmap.Create;
    try
      bmp.LoadFromFile('textures\invisible.bmp');
      self.Canvas.Draw(0,0,bmp);
    finally
      bmp.Free;
    end;
  end;
  </code></pre>
  
  <p>But the Panel's Canvas is still the image I applied in the Paint procedure. </p>
  
  <p>I already tried to move the drawing from the Paint procedure to the Constructor which didn't work. </p>
  
  <p>The path is also correct, switched the paths and now the Panels have the 'invisible.bmp' image.</p>
  
  <p>Whole Class/Unit: <a href="http://pastebin.com/YhhDr1F9" rel="nofollow">http://pastebin.com/YhhDr1F9</a></p>
  
  <p>Any idea why this doesn't work?</p>