ERLEDIGT
NEIN
NEIN
ANTWORTEN
0
0
ZUGRIFFE
1087
1087
EMPFEHLEN
-
Hallo,
ich fange deshalb ein neues Thema an, da es nicht mehr um die Erstellung dynamischer Shapes geht, sondern um deren direkte verarbeitung:
Die erzeugte Shapes schießen immer weit über die top des Shapes1 hinaus, anstatt "umzudrehen" hat jemand eine Idee?Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
procedure TForm1.Timer1Timer(Sender: TObject); begin if (slepos <= shape1.left+shape1.width) then begin MyTShape:=TShape.Create(Self); MyTShape.Parent:=Form1; MyTShape.Show; MyTShape.height:=sheight; MyTShape.width:=swidth; MyTShape.top:=stppos; MyTShape.left:=slepos; MyTShape.Name:='Shape'+inttostr(j); MyTTimer:=TTimer.Create(Self); MyTTimer.tag:=j; MyTTimer.Interval:=1; MyTTimer.OnTimer := TimerProc; slepos:=slepos+periode; j:=j+1; end else begin end; end; procedure TForm1.TimerProc(Sender: TObject); var Comp : TComponent; Name : string; Shape : TShape; Nummer : integer; begin Nummer := (Sender as TTimer).Tag; Name := 'Shape' + IntToStr(Nummer); Comp := FindComponent(Name); Shape := TShape(Comp); edit1.text:=inttostr(shape.top); if (untenshape=false) AND (rechtsshape=false) then begin Shape.top:=Shape.top-5; end; if (untenshape=true) AND (rechtsshape=false) then begin Shape.top:=Shape.top+5; end; if (Shape.top+Shape.height)>=(shape1.top+shape1.height) then begin untenshape:=true; end; if (Shape.top)<=(shape1.top) then begin untenshape:=false; end; if (Shape.left+Shape.width)>=(shape1.left+shape1.width) then begin rechtsshape:=true; end; end;
MfG Blck
Ähnliche Themen
-
Hilfe bei Abfrage dynamisch erzeugter inputfelder
Von Hunting4u im Forum Javascript & AjaxAntworten: 14Letzter Beitrag: 23.08.09, 15:07 -
Delphi 5 + Eigenschaften erzeugter Komponenten
Von blck im Forum Delphi, Kylix, PascalAntworten: 7Letzter Beitrag: 24.06.09, 16:17 -
Überprüfung dynamisch erzeugter Radiobuttons
Von knallbernd im Forum PHPAntworten: 7Letzter Beitrag: 26.06.07, 23:44 -
Kompilierproblem (von Swig erzeugter Code)
Von DarthShader im Forum C/C++Antworten: 1Letzter Beitrag: 21.05.07, 11:57 -
Hintergrund transparent bei von PHP erzeugter Grafik
Von neuni im Forum PHPAntworten: 3Letzter Beitrag: 07.02.05, 02:09





Zitieren
Login





