Autor Beitrag
Orothred
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 86


C# (VS 2005)
BeitragVerfasst: Mo 16.07.07 23:10 
Hi!

Wie kann ich bei mehreren Labeln die Eigenschaft enabled mit einer for-schleife von TRUE auf FALSE setzen? also das heißt wie kann ich die labels in der for-schleife ansprechen?
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Di 17.07.07 00:20 
Mit Findcomponent die Dinger suchen und die gewünschten Werte setzen.

_________________
Gruß
Hansa
Orothred Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 86


C# (VS 2005)
BeitragVerfasst: Di 17.07.07 01:06 
hm....kannste das bissl genauer erklären? bin noch net soo fit in delphi ^^
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Di 17.07.07 01:49 
user profile iconOrothred hat folgendes geschrieben:
.. bin noch net soo fit in delphi ^^


Ja, so : F1 :mrgreen:

_________________
Gruß
Hansa
oldmax
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 380


D3 Prof, D4 Prof
BeitragVerfasst: Di 17.07.07 05:42 
Hi
Ein wenig mehr Hilfe kann nicht schaden.....
Benenne deine Labels mit einem laufenden Index (falls es nicht schon automatisch passiert ist oder der Bereich nicht passt)
z.B. MyLabel_1 ... MyLabel_n
Die Trennung erfolgt nur der Übersicht wegen.
Mit
ausblenden Delphi-Quelltext
1:
TLabel(FindComponent('MyLabel_'+IntToStr(i))).Enabled:=False; // oder True					

kannst du die einzelnen Objekte dann ansprechen.
Gruß oldmax

_________________
Zier dich nich so, ich krieg dich schon....
Orothred Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 86


C# (VS 2005)
BeitragVerfasst: Di 17.07.07 11:42 
vielen dank, genau das hab ich gebraucht.

eine andere frage hab ich noch. wie kann ich bei einer if-abfrage einrichten dass wenn die bedingung nicht erfüllt ist die procedure gestoppt wird?
Dunkel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 682

Mac OS X Snow Leopard
Xcode 3.1
BeitragVerfasst: Di 17.07.07 11:49 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
  if x = y then
    begin
      { mach was }
    end
  else
    exit; { hier wird die Prozedur beendet, das nächste if wird nicht mehr ausgeführt }

  if y = z then
    { ... }

_________________
Ich streite einsam mich mit dieser Oberflächenwelt
Gutes sei ein löblich Brot von dem ich zehre - bis zum Tod [Das Ich - Im Ich]


Zuletzt bearbeitet von Dunkel am Di 17.07.07 11:49, insgesamt 1-mal bearbeitet
Agawain
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 460

win xp
D5, MySQL, devxpress
BeitragVerfasst: Di 17.07.07 11:49 
mit exit
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: Di 17.07.07 12:11 
Bevor hier noch eine Frage aufkommt, mache ich hier zu.

Erstelle bitte für jede Frage ein neues Topic. - Danke.

_________________
We are, we were and will not be.
Dieses Thema ist gesperrt, Du kannst keine Beiträge editieren oder beantworten.

Das Thema wurde von einem Team-Mitglied geschlossen. Wenn du mit der Schließung des Themas nicht einverstanden bist, kontaktiere bitte das Team.