@ Sir Thornberry
besser?
ich hab jetzt mal einen ansatz, aber es wird immernoch nichts angezeigt!:
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);
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;
...