Autor Beitrag
majolo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 334

Ubuntu 8.04, WinXP Prof.
D1, D6Pers, D7 Prof., D8 Prof., D2005 Pers
BeitragVerfasst: So 29.12.02 20:54 
Hallo,

habe ein kleines Problem.Ich habe ein for Schleife die mehrmals durchlaufen wird um genau zu sein 6 mal.Und mehrere editfelder.Nun zu meinem Problem: Der Name des Editfeldes soll so aufgebaut sein:
edit+Runde in der die Schleife sich befindet+.Text; wie sieht die Syntax zum Aufbau des Namen des Editfeldes aus.
Ich habe es mit
Edit+i+.Text und tausend Variationen versucht.Klappt aber nicht.i ist die selbe Variable die auch zum Hochzählen der Schleife verwendet wird.
Dürfte eigentlich nicht allzu schwer sein.Ich komm trotzdem nicht darauf.
Gruss
majolo
Dev4u.ch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 36



BeitragVerfasst: Mo 30.12.02 00:28 
hast aber schon inttostr(i) verwendet oder??

_________________
Jedes Programm wurde von einem Menschen gecodet - Menschen machen nun mal Fehler!!
Udontknow
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2596

Win7
D2006 WIN32, .NET (C#)
BeitragVerfasst: Mo 30.12.02 11:31 
Hi!

Du weisst, dass du die Methode Findcomponent benutzen musst? Wenn nicht, jetzt weisst du´s. :wink:

Suche einfach mal im Forum danach, es wurde schon mehrmals diskutiert.

Cu,
Udontknow
bis11
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1247
Erhaltene Danke: 2

Apple Mac OSX 10.11

BeitragVerfasst: Mo 30.12.02 12:16 
Hi,

erstellst Du die Editfelder selber in der FOR-Scheilfe oder sind die Felder schon da und Du möchtest nur den Namen ändern ?[/code]
majolo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 334

Ubuntu 8.04, WinXP Prof.
D1, D6Pers, D7 Prof., D8 Prof., D2005 Pers
BeitragVerfasst: Mo 30.12.02 12:26 
@bis11: Die Editfelder sind schon da.
@Dev4U.Ch:Das bringt nichts.Habe ich probiert.
@Udontknow:FindComponent muss ich mal im Forum gucken.

Das Problem ist dies: Die 6 Editfelder stehen schon da.Meine Schleife wird 6 mal durchlaufen.Bei jedem Durchlauf soll etwas aus einem anderen Editfeld gelesen werden.Beim ersten durchlauf aus Edit1.Text, beim 2.mal aus Edit2.Text usw... habe aber keine Lust das alles hinzuschreiben sondern wollte für die nummer des Editfeldes ebenfalls die Variable i einsetzen.Wie geht das???
Gruss
majolo
majolo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 334

Ubuntu 8.04, WinXP Prof.
D1, D6Pers, D7 Prof., D8 Prof., D2005 Pers
BeitragVerfasst: Mo 30.12.02 12:32 
@Udontknow:Ich glaube dein Tipp war richtig.FindComponent ist doch sowas in der Art:
ausblenden Quelltext
1:
TEdit(FindComponent('Edit'+IntToStr(i))).Text					
:wink:

Gruss
majolo
Udontknow
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2596

Win7
D2006 WIN32, .NET (C#)
BeitragVerfasst: Mo 30.12.02 12:50 
Jawohl, genau so wird´s angewendet.

Cu, :)
Udontknow
majolo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 334

Ubuntu 8.04, WinXP Prof.
D1, D6Pers, D7 Prof., D8 Prof., D2005 Pers
BeitragVerfasst: Mo 30.12.02 14:37 
Und hat auch wunderbar gefunzt :P

majolo