Einzelnen Beitrag anzeigen

Super_Chemiker

Registriert seit: 16. Nov 2008
111 Beiträge
 
Delphi 2009 Professional
 
#8

Danke im Voraus

  Alt 29. Dez 2008, 13:39

was gehört da rein?
ich hab mal folgendes versucht:
Delphi-Quellcode:
...
constructor TStein.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  Color := clBtnFace;
  Canvas.Brush.Color := Color;
  Pressed := false;
  Caption := 'Test';
  SetBounds (0,0,50,50);
end;

procedure TStein.Paint;
begin
  x := (Width - Canvas.TextWidth(Caption)) div 2;
  y := (Height- Canvas.TextHeight(Caption)) div 2;
  Canvas.Rectangle (3, 3, Width-3, Height-3);
  canvas.TextOut(x,y, Caption);
end;
...
allerdings wird immernoch nichts angezeigt
Vielen Dank im Voraus
Florian
  Mit Zitat antworten Zitat