Autor Beitrag
Raffy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26



BeitragVerfasst: Mo 09.08.04 11:04 
Hallo Leute

Ich möchte mal wissen, wie ich es machen kann, dass wenn ne
bestimmte bedingung erfüllt ist, dass dann ein bestimmtes bild
angezeigt wird. Ich habe damit schon mal angefangen und
habe es geschaft, dass dann ein text angezeigt wird. Aber wie mache
ich das mit einem Bild?

MFG
Raffy
catweasel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 487
Erhaltene Danke: 1

Win 7 64bit
Delphi 7 Second Sedition V7.2
BeitragVerfasst: Mo 09.08.04 11:07 
hmmm

ausblenden Delphi-Quelltext
1:
if bedingung = true then bild.visible = true;					


oder kurz :

ausblenden Delphi-Quelltext
1:
bild.visible := bedingung;					


Catweasel

_________________
Pommes werden schneller fertig wenn man sie vor dem Frittieren einige Minuten in siedendes Fett legt.
NeWsOfTzzz
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 233


D4 Prof
BeitragVerfasst: Mo 09.08.04 11:47 
naja beim zweiten muss er aber die bedingung noch in klammern setzen hehe
Phobeus
ontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1280

Linux (FC6), WinXP Pro (Box)
D6 Pers, D7 Pro, FPC 2.x
BeitragVerfasst: Mo 09.08.04 12:05 
hm? Das verstehe ich nun nicht. Sei die Sonne dran schuld, ich empfinde seines schon als richtig. Evtl. würde ich abkürzen auf "if bedingung then" und auch würde ich vielleicht nicht mit Visible arbeiten, sondern lieber entsprechendes Bild in einem Image nachladen. Solange man nur ein Bild verwendet wird diese Lösung sicherlich legitim sein.

_________________
"Menschen sterben nicht wenn man sie zu Grabe trägt, sondern wenn sie ihre Träume verlieren..."
NeWsOfTzzz
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 233


D4 Prof
BeitragVerfasst: Mo 09.08.04 15:13 
bild.visible := bedingung;
das ist das zweite und wenn man sich das mal anguckt dann wäre das
bild.visible := a=b;
das geht so nicht muss man schreiben:
bild.visible := (a=b);