Autor Beitrag
Horschdware
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 744
Erhaltene Danke: 54

Win XP Pro, Win 7 Pro x64
Delphi 7, Delphi XE, C++ Builder 5, SAP R/3
BeitragVerfasst: Sa 26.02.05 13:21 
Tach,
hab ne kurze Frage die garantiert schon gestellt und beantwortet wurde, aber ich finds nicht.
Ich frage ein paar variablen rd1, rd2 rd3 ab und lasse dann mit einem TImage etwas geschehen.
ausblenden Delphi-Quelltext
1:
2:
3:
if rd1 then i_1.picture:=....;
if rd2 then i_2.picture:=....;
if rd3 then i_3.picture:=....;


Dummerweise wurden aus den 3 Variablen und Bildern ein paar mehr.
Also Denk ich mir: Machen wirs doch eleganter:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
rd : array[1..3] of boolean;

for i:=1 to 3 do
  if rd[i] then ..... //jaa.. und hier das problem

Wie kann ich meine x-wieviele Images (i_1, i_2,...) durchzählen?
ich weiss dass es geht... nur nicht mehr -wie-...

_________________
Delphi: XE - OS: Windows 7 Professional x64
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Sa 26.02.05 13:23 
Suche in: Delphi-Forum, Delphi-Library FINDCOMPONENT, wird jede Woche 5x gefragt.

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Sa 26.02.05 13:26 
oder besser nen array machen

var imagearray = array[0..10] of TImage;
usw.
Horschdware Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 744
Erhaltene Danke: 54

Win XP Pro, Win 7 Pro x64
Delphi 7, Delphi XE, C++ Builder 5, SAP R/3
BeitragVerfasst: Sa 26.02.05 13:52 
Danke, das wars auch schon! :D

_________________
Delphi: XE - OS: Windows 7 Professional x64