Autor Beitrag
DarkLord05
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 449

WinXP Pro SP2
Opera; Delphi 3 Pro; Delphi 2005, Turbo Delphi, dev-c++, Eclipse, MS Visual Studio .NET 2003, MS Visual C++
BeitragVerfasst: Do 30.06.05 19:50 
So, ich will in einer Schleife mehrere sachen abfragen. In der Schleife soll dies allerdings sofort weiterverarbeitet werden.
Ich habe mehrere Komponenten und die heißen z.B. alle folgendermaßen:
ProgrammEdit1
ProgrammEdit2
ProgrammEdit3
...
Jetzt will ich in der Schleife das in allen der Text geändert wird. Ich will aber das nur einmal schreiben und das die Zahl hinter dem Edit immer steigt (1..2..3...).
Beim 1. Durchlauf soll ProgrammeEdit1 geändert werden.
Beim 2. Durchlauf soll ProgrammeEdit2 geändert werden.
usw....

Genau das gleiche auch mit Variablen.

Weiß jemand wie man das umsetzen könnte?

_________________
QBasic | Delphi | c++ | PHP | C# .NET | Java
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Do 30.06.05 19:54 
Das Stichwort, was dir fehlt, ist Suche in: Delphi-Forum, Delphi-Library FINDCOMPONENT.

_________________
We are, we were and will not be.
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Do 30.06.05 19:55 
Hallo!

Such mal nach Suche in: Delphi-Forum, Delphi-Library FINDCOMPONENT. Das ist genau das, was Du brauchst.

Grüße
Christian

//Edit: Zu langsam :motz:

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
DarkLord05 Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 449

WinXP Pro SP2
Opera; Delphi 3 Pro; Delphi 2005, Turbo Delphi, dev-c++, Eclipse, MS Visual Studio .NET 2003, MS Visual C++
BeitragVerfasst: Do 30.06.05 20:05 
*FREU* Danke, habe da was (VIEL) gefunden.

(Ein ergebnis:)
www.delphi-forum.de/...hlight=findcomponent
------------------------------------------------------------------------------------

Und mit Variablen... das kann man sicher nicht so machen oder?!
DarkLord05 Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 449

WinXP Pro SP2
Opera; Delphi 3 Pro; Delphi 2005, Turbo Delphi, dev-c++, Eclipse, MS Visual Studio .NET 2003, MS Visual C++
BeitragVerfasst: Fr 01.07.05 16:46 
So habe ich das jetzt versucht umzusetzten:

Für EditFelder auf einer anderen Form (namens QuickLink):
ausblenden Delphi-Quelltext
1:
QuickLink.FindComponent ('Programm' + IntToStr (i))as TEdit.Text := ProgrammLink;					

Da zeigt er folgenden Fehler beim compilieren an:
Zitat:
[Error] Programm.pas(280): E2015 Operator not applicable to this operand type


Dies habe ich dann auch mit der anderen Möglichkeit ausprobiert, die der andere bei seinem Problem auch hatte (siehe link oben):
ausblenden Delphi-Quelltext
1:
TEdit (QuickLink.FindComponent ('Programm' + IntToStr(i))).Text := ProgrammLink;					

Zitat:
[Error] Programm.pas(282): E2066 Missing operator or semicolon


Hier ein weiterer Versuch. Die Komponenten befinden sich auf der gleichen Form wie das andere oben auch.
ausblenden Delphi-Quelltext
1:
(QuickLink.FindComponent ('ProgrammBox' + IntToStr (i)) as TCheckBox).Checked := True;					

Zeigt auch nix an, erst beim Compilieren gibt es folgende Fehlermeldung von Windows:

Zitat:
Access violation at address 0041A12C in module 'Projekt__Programm.exe' Read of address 00000010.