Autor Beitrag
icedre
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45

Windows XP Prof. , SuSE Linux 9.0 Prof.
Borland Delphi 6.0 Enterprise
BeitragVerfasst: Sa 26.02.05 19:17 
Hallo,

ich hab folgendes Problem: Möchte eine IF Anweisung in das OnChange Ereigniss einer Combobox miteinbringen, und zwar so:
ausblenden Delphi-Quelltext
1:
If Combobox1.Text:='Green' then ...					

Jetzt bekomm ich immer den Fehler:
Zitat:
Ausdruckstyp muss BOOLEAN sein

Jetzt hab ich leider noch nicht´s mit BOOLEAN gemacht :oops: Ich weiß, das BOOLEAN nur zwei Werte annimmt, TRUE und FALSE, aber was muss ich als BOOLEAN deklarieren ???

Vielen Dank, icedre

Moderiert von user profile iconTino: Quote- und Delphi-Tags hinzugefügt.

_________________
Sprach Abraham zu Braham:
Kann ich deine Frau besamen
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Sa 26.02.05 19:19 
Gar nichts, weil es ComboBox1.Caption heißt ;)

AXMD
Kroni
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 720

Win 98, Win ME, Win2k, Win XP
D3 Pro
BeitragVerfasst: Sa 26.02.05 19:22 
nein, es liegt nich an der caption;-) das ist nur ein Fehler nebenbei..der fehler liegt hier:
ausblenden Delphi-Quelltext
1:
If Combobox1.caption:='Green' then					

das muss If Combobox1.caption='Green' then heißen...
:= ist der Zuweisungsoperator...d.h. der linken seite wird das, aws rechts steht zugeordenet

bei if bedingungen (nicht schleifen^^) musst du ein = verwenden...das ist der vergleichsoperator!°


Zuletzt bearbeitet von Kroni am Sa 26.02.05 19:30, insgesamt 1-mal bearbeitet
icedre Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45

Windows XP Prof. , SuSE Linux 9.0 Prof.
Borland Delphi 6.0 Enterprise
BeitragVerfasst: Sa 26.02.05 19:29 
Alles klar, vielen Dank ! :D :D

_________________
Sprach Abraham zu Braham:
Kann ich deine Frau besamen