Meine Propertys sehen so aus:
Delphi-Quellcode:
property ECatption: String read FECaption write SetECaption;
property ECatptionOver: String read FECaptionOver write SetECaptionOver;
property ECatptionDown: String read FECaptionDown write SetECaptionDown;
Ich verwende also nicht die schon vorhandene Property Caption, sondern
will diese selber machen, weil ich gleich drei brauche und mir aber std mässig
nur eine zur verfügung steht.

Zitat von
mkinzler:
Wie sieht den dein Konstruktor aus?
Der sieht momentan so aus, funzt aber nicht!
Caption ist während Constructor-zeit irgendwie noch nicht verfügbar, es wird kein
Wert übergeben.
Und ich will das standardmässig der Name also z.B. Button1, Button2...
für alle Captions gesetzt wird.
Delphi-Quellcode:
constructor TEButton.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
DoubleBuffered := True;
FEFont := TFont.Create;
FEFontOver := TFont.Create;
FEFontDown := TFont.Create;
FEColor:=clWhite;
FEColorOver:=clSilver;
FEColorDown:=clGray;
FEBrushStyle:=bsSolid;
FEBrushStyleOver:=bsSolid;
FEBrushStyleDown:=bsSolid;
FEPenColor:=clSilver;
FEPenColorOver:=clGray;
FEPenColorDown:=clSilver;
[color=#005fff]
ECaption:=Caption;
ECaptionOver:=Caption;
ECaptionDown:=Caption;
[/color]
Width:=75;
Height:=25;
FMouseOver:=false;
FMouseDown:=false;
FEOnFocusedShow:=true;
FEOnFocusedColor:=clAqua;
FEOnDefaultShow:=true;
FEOnDefaultColor:=clBlack;
FEnemyRoundedW:=5;
FEnemyRoundedH:=5;
TabStop:=True;
FActive:=FDefault;
end;
Ne Idee den Namen zu übergeben, sodass er nach dem rüberziehen der Komponente
auf meine Form bereits im
OI steht?