Announcement

Collapse
No announcement yet.

Formular Ableiten

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Formular Ableiten

    Hallo

    Ich habe ein neues Formular von TFrom abgeleitet und habe dabei die Funktion Paint überschrieben. So weit so gut zur Laufzeit Funktioniert auch alles, nun möchte ich aber dass mein Funktion Paint auch zur DesignTime ausgelöst wird damit ich bereits in der IDE sehe wie das Formular aussieht.

    Leider habe ich keine Ahnung wie ich das anstellen soll?

    Hier mein Code für die Funktion Paint:
    Code:
    procedure TFormEASYLEARN.Paint;
    var aRect1 : TRect ;
        aPoint1 : TPoint ;
    begin
      Inherited;
    
      Color := clWhite ;
      aRect1.Left := 0 ;
      aRect1.Top := 0 ;
      aRect1.Bottom := ClientHeight ;
      aRect1.Right := ClientWidth ;
      Canvas.Brush.Color:= clWhite ;
      Canvas.FillRect( aRect1 ) ;
      Canvas.Pen.Color := clBlack ;
      Canvas.RoundRect(2, 2, ClientWidth - 2, ClientHeight - 2, 20, 20);
      aPoint1.X := 2 ;
      aPoint1.Y := 100 ;
      Canvas.Pen.Color := clBlack ; ;
      Canvas.PenPos := aPoint1 ;
      Canvas.LineTo(ClientWidth - 2 , 100) ;
      Canvas.Brush.Color:= clRed ; ;
      Canvas.FloodFill(10,10,clWhite,fsSurface) ;
    end;
    Für Hilfe bin ich bereits im voraus dankbar...

    Grüsse
    Adrian
Working...
X