Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by halinchen,
14. Feb 2007
Ich geh mal von der Prozedur Paint aus. (Also muss erstmal stimmen, aber es kam ja noch kein Protest :roll: )
procedure TMyShape.Paint();
begin
inherited;
If Self.Shape = stKaro then begin
Canvas.PenPos(Trunc(Self.ClientWidth/2),0); //Setzt die Stift Position ganz oben in die Mitte
Canvas.LineTo(0,Trunc(Self.Clientheight/2)); //zeichnet eine Linie von der Stiftposition zu...
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by halinchen,
14. Feb 2007
Nein, aber das lässt sich alles übernehmen.
Ich würde erstmal ein Komponente ableiten.
Dann würde den Typ TShape so überschrieben, dass sie man da auch ein Karo auswählen kann.
(da
published property Shape: TShapeType read FShape write SetShape;
)
Dann musst du die Paint-Prozedur überschrieben.
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by halinchen,
14. Feb 2007
http://www.dsdt.info/tutorials/?cat=3
Sowas?