Autor Beitrag
hibbert
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Mo 25.10.04 22:05 
Hi,
ich habe 3 Shapes auf meiner Form.

Nun möchte ich gerne, dass wenn die Variable I den Wert 1 hat, dass sich das Shape 1 bewegt.

Hat I den Wert 3 dann Shape3.

Bei 3 Shapes ist das ja noch einfach mit If abfragen zu lösen, doch die kann ich das machen, wenn ich 20 oder mehr Shapes habe ??

Ich meine, hat I der Wert 19 dann soll sich Shape 19 bewegen.

Ich will ein Objetzt mit der Variable direkt ansprechen.

zb.
Zitat:
shape[Variable].left:=100;


Geht so etwas überhaupt ??

thx hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej
Kroni
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 720

Win 98, Win ME, Win2k, Win XP
D3 Pro
BeitragVerfasst: Mo 25.10.04 22:12 
Les dir mal folgendes Tutorial durch:
www.delphi-forum.de/...ntenArrays_7204.html
hibbert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Mo 25.10.04 22:50 
Ich will nichts mit arrays machen...

Formuliere ich meine Frage mal anders:
ausblenden Quelltext
1:
2:
var objekt:string;
objekt:='shape1';

nun soll etwas mit dem shape1 gemacht werden, aber ohne abfrage.

objekt.left:=0;
sodass hier objekt durch den Wert in der Var Objekt ersetzt wird.

hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Mo 25.10.04 22:55 
mit componenten ginge es so: Suche in: Delphi-Forum, Delphi-Library FINDCOMPONENT

_________________
JSXGraph