Autor Beitrag
Airwolf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 92



BeitragVerfasst: Sa 21.04.07 14:43 
Hi Leut's,
das hat zwar noch immer mit meinem Bioporgramm zu tun, aber da ich weiß dass ihr das nicht gerne seht wenn man viele verschiedene Fragen in einem Fred stellt , mache ich hier nen neuen auf.

Also, ich möchte, dass man das Quiz erst starten kann [auf einen Button klicken kann] wenn man in beiden Radiogroups seine Auswahl getroffen hat.

Das habe ich bis jetzt so versucht zu bewerkstelligen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
if (Thema.ItemIndex= (0) OR (1) OR (2)) AND (Anzahl.ItemIndex= (0) OR (1) OR (2)) then begin
                                                                                       form2.hide;
                                                                                       form3.show;
                                                                                       end
                                                                                  else begin
                                                                                       MessageDlg('Bitte wählen Sie ein Thema und die Fragenanzahl aus!', mtInformation, [mbOk], 0);
                                                                                       end;


jedoch tut sich da nix, bzw. bekomme ich immer meine Meldung ich solle doch ein Thema und die Anzahl auswählen.

Was ist da falsch?



P.S. Für die die sich wundern dass ich noch mit dem Teil mich rumärgere obwohl ich so ne Panik verbreitet hatte dass es fix fertig werden muss:
1. Wir bekamen überraschend noch ne Woche mehr Zeit
2. Musste ich es trotzdem schon "abgeben" aber ein paar Details dürfen wir noch verändern
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Sa 21.04.07 15:41 
So ist es korrekt:
ausblenden Delphi-Quelltext
1:
2:
X := Thema.ItemIndex;
if (X = 0) OR (X = 1) OR (X = 2) ... then

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Airwolf Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 92



BeitragVerfasst: Sa 21.04.07 15:59 
Hmm, jetzt passiert noch weniger...
Wenn ich ohne was auszuwählen auf den Button klicke, dann komme ich gleich zum Form3.

Also, er sagt mir nicht dass ich was auswählen soll..

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
if ((a=0) OR (a=1) OR (a=2)) AND ((b=0) OR (b=1) OR (b=2)) then begin
                                                                form2.hide;
                                                                form3.show;
                                                                end
                                                           else begin
                                                                MessageDlg('Bitte wählen Sie ein Thema und die Fragenanzahl aus!', mtInformation, [mbOk], 0);
                                                                end;


a und b sind jeweils der ItemIndex
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Sa 21.04.07 16:02 
Wenn du prüfen willst, ob überhaupt was ausgewählt ist, dann ist es so besser:
ausblenden Delphi-Quelltext
1:
2:
if (Thema.ItemIndex > -1) AND (CheckBox2.ItemIndex > -1) then
  //...

Probier es mal so rum.

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Airwolf Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 92



BeitragVerfasst: Sa 21.04.07 16:51 
Danke funkt