Autor Beitrag
areuter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75



BeitragVerfasst: Mi 09.03.05 15:52 
hallo.
ich habe ein kurze frage: wenn ich eine combobox habe und mehrere edit-felder. kann ich dann die edit felder "mit einer fortlaufenden nummer ansprechen"?
muss ich edit mit edit(zahl) oder edit[zahl] ansprechen? ist dies überhaupt möglich?
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
var
  Form1: TForm1;
  zahl: integer;
  implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
zahl:=1;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
zahl:=zahl+1;
edit(zahl).text:=combobox1.text;
end;
end.

vielen dank für die hilfe!
arne

Moderiert von user profile iconGausi: Delphi-Tags hinzugefügt.
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8548
Erhaltene Danke: 477

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mi 09.03.05 15:56 
Möglichkeit1: Die Edits zur Laufzeit in ein Array of TEdit einfügen, und dann über den Array-Index darauf zugreifen.
Möglichkeit2: Suche in: Delphi-Forum, Delphi-Library FINDCOMPONENT

_________________
We are, we were and will not be.
OneOfTen
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mi 09.03.05 15:57 
areuter Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75



BeitragVerfasst: Mi 09.03.05 16:07 
funktioniert.
vielen vielen dank für die schnelle antwort!