Ich habe jetzt folgendes geschrieben, aber das funktioniert nicht.
Delphi-Quellcode:
unit ImagePanel;
interface
uses
SysUtils, Classes, Controls, ExtCtrls;
type
TImagePanel =
class(TImage)
private
{ Private-Deklarationen }
protected
{ Protected-Deklarationen }
public
constructor Create(AOwner: TComponent);
override;
published
{ Published-Deklarationen }
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('
Standard', [TImagePanel]);
end;
constructor TImagePanel.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
ControlStyle := ControlStyle + [csAcceptsControls];
end;
end.