Autor Beitrag
aDm1n
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 37

Win XP
Turbo Delphi Explorer
BeitragVerfasst: Di 22.08.06 01:22 
Guten...Nacht,
ich möchte innerhalb einer for-Schleife die Zählervariable für den Namen eines edit-Feldes benutzen, komme jedoch beim besten Willen net auf die Syntax. Entweder bin ich net mehr ganz da oder das ist einfach ne Bildungslücke^^.

Zur Verdeutlichung:
ausblenden Delphi-Quelltext
1:
2:
3:
for i := 1 to players do begin
  frm_main.ed_player(i).visible := true;
end;


Danke im Vorraus

_________________
Gruß aDm1n
Ironwulf
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 733
Erhaltene Danke: 2



BeitragVerfasst: Di 22.08.06 02:07 
öhm das geht mit findcomponent
einfach mal in der delphi hilfe nachschun oder hier im forum
uwewo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 154



BeitragVerfasst: Di 22.08.06 06:08 
ausblenden Delphi-Quelltext
1:
2:
for i := 1 to players do
    (FindComponent('Edit'+IntToStr(i)) as TEdit).Visible := True;
aDm1n Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 37

Win XP
Turbo Delphi Explorer
BeitragVerfasst: Di 22.08.06 15:01 
Ja so klappt das. Dankeschön!

_________________
Gruß aDm1n
Sina4ever
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 76



BeitragVerfasst: Di 12.09.06 12:40 
wohl doc nicht, was mach ich falsch
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
if FindComponent('checkbox'+inttostr(DayofWeek(datum)) as Tcheckbox).checked = True then
  begin
  ShowMessage(ok);
  //sendedaten(day,month,year);

  end;


ausblenden Quelltext
1:
[Pascal Fehler] Unit1.pas(132): E2015 Operator ist auf diesen Operandentyp nicht anwendbar					
ManniTwo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 46

Win XP SP III, Ubuntu 8.04, Debian 5.0
Delphi 5 Pro; Delphi 2005; C++,C# (VS 2005); Java, Ruby (Eclipse)
BeitragVerfasst: Di 12.09.06 12:47 
user profile iconSina4ever hat folgendes geschrieben:
wohl doc nicht, was mach ich falsch
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
if FindComponent('checkbox'+inttostr(DayofWeek(datum)) as Tcheckbox).checked = True then
  begin
  ShowMessage(ok);
  //sendedaten(day,month,year);

  end;


ausblenden Quelltext
1:
[Pascal Fehler] Unit1.pas(132): E2015 Operator ist auf diesen Operandentyp nicht anwendbar					


Klammernsetzung... Du musst die FindComponent-Klammer vor dem as schließen und dann vor FindComponent auch noch eine setzen...

_________________
Wer andern eine Bratwurst brät, der hat ein Bratwurst-Brat-Gerät, oder anders:
ausblenden Delphi-Quelltext
1:
if Self.BraetAndernEineBratwurst then Self.HasBratwurstBratGeraet := true;					
Sina4ever
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 76



BeitragVerfasst: Di 12.09.06 12:48 
danke