Forum | | | | diimool25 | Hello I brächte Help means we want one ''Quiz'' make and having because radioButtons as antwortmöglichkeiten. how can I the now take on the if I on evaluate press the there standing the The response correctly. or wrong is
thanks for hilfen !!! |
| | | | |
| | Nico Madysa | Hi! You can with the function GetCheck() Verify, whether a bestimmter Radiobutton select watts or not. If "Auswerten" clicked been is, must You means only Verify, whether the korrekte Radiobutton select is, or not. CompileMarkSeparation |
| | | | |
| | diimool25 | How very must I because at hauptprogramm_rum make ?
Declare kleine_zahl&, alter&
Declare button_ende%, button_löschen%, button_auswerten%, welt%[10], Text%[10],RadionButton%[50] Declare komma_zahlen!, prices!
Declare Text$
proc hauptprogramm_skin
window 0,0 - %maxx,%maxy UseBrush 1,@RGB(0,0,255) USEP 3,5,@RGB(0,0,0) Rectangle 0,0 - %maxx-20, %maxy-100
button_ende% = @Create("Button",%HWnd,"E n D E", %maxx -180,%maxy - 180,145,50) button_auswerten% = @Create("Button",%HWnd,"Auswerten", %maxx -330,%maxy - 180,140,50) button_löschen% = @Create("Button",%HWnd,"Löschen", %maxx -490,%maxy - 180, 150,50) welt%[1] = @Create("GroupBox",%HWnd," is correct it, that The making of/ one Cola-tin about same plenty cost, as making the Colas, the therein encompassed is?",20,10,850,250) welt%[2] = @Create("GroupBox",%HWnd," which the under named provisions contains on the most iron?",20,300,850,250) welt%[3] = @Create("GroupBox",%HWnd," by which 'trocknet' Sekundenkleber?",20,600,850,250) welt%[4] = @Create("GroupBox",%HWnd," In which europäischen town there most bridges?",900,10,850,250) welt%[5] = @Create("GroupBox",%HWnd," Wovon get we The meiste radioaktive Strahlung ex?",900,300,850,250) welt%[6] = @Create("GroupBox",%HWnd," what got one at world-wide first Münzautomat for its money?",900,600,850,250)
RadionButton%[1] = @Create("RadioButton",welt%[1],"ja, both cost about same viel",10,75,300,25) RadionButton%[2] = @Create("RadioButton",welt%[1],"nein, the Cola is expensive as The Dose",10,110,300,25) RadionButton%[3] = @Create("RadioButton",welt%[1],"nein, The tin is expensive as the Cola",10,145,300,25) 'x
RadionButton%[4] = @Create("RadioButton",welt%[2],"Schokolade",10,50,100,30) RadionButton%[5] = @Create("RadioButton",welt%[2],"Spinat",10,90,100,30) RadionButton%[6] = @Create("RadioButton",welt%[2],"Schokolade",10,130,100,30)'x
RadionButton%[7] = @Create("RadioButton",welt%[3],"Wärme",10,50,100,30) RadionButton%[8] = @Create("RadioButton",welt%[3],"Feuchtigkeit",10,90,100,30)'x RadionButton%[9] = @Create("RadioButton",welt%[3],"Sauerstoff",10,130,100,30)
RadionButton%[10] = @Create("RadioButton",welt%[4],"Hamburg",10,50,100,30)'x RadionButton%[11] = @Create("RadioButton",welt%[4],"Venedig",10,90,100,30) RadionButton%[12] = @Create("RadioButton",welt%[4],"Amsterdam",10,130,100,30)
RadionButton%[13] = @Create("RadioButton",welt%[5],"By Atomkraftwerken and radioaktivem Abfall",10,50,500,30) RadionButton%[14] = @Create("RadioButton",welt%[5],"By zurückliegenden Atombomben-Tests",10,90,500,30) RadionButton%[15] = @Create("RadioButton",welt%[5],"By the natural Strahlung the Erde",10,130,500,30)'x
RadionButton%[16] = @Create("RadioButton",welt%[6],"Kaugummi",10,50,100,30) RadionButton%[17] = @Create("RadioButton",welt%[6],"Brot",10,90,100,30) RadionButton%[18] = @Create("RadioButton",welt%[6],"Wasser",10,130,100,30)'x
endproc
proc hauptprogramm_run Repeat waitinput if @GetFocus(button_auswerten%)
endif endif
until @Or(Clicked(button_ende%) , %scankey = 27) endproc
proc hautprgramm_end @DestroyWindow(%hwnd) endproc
'Hauptprogramm
hauptprogramm_skin hauptprogramm_run hautprgramm_end
end |
| | | | |
| | H.Brill | becomes well something difficult with the Coordinates, there with Groupboxen worked becomes. The Radiobuttons go then Yes relatively to Groupbox staid. with your code becomes it well plainer his, with richtiger response, The restlichen 2 Radiobuttons To deaktivieren. with falser response You can then yet improve and again evaluate let. therefore would I it time so make : CompileMarkSeparationDeclare kleine_zahl&, alter&
Declare button_ende%, button_löschen%, button_auswerten%, Rahmen%[10], text%[10],RadionButton%[50]
Declare komma_zahlen!, preise!
Declare text$
proc hauptprogramm_skin
window 0,0 - %maxx,%maxy
UseBrush 1,@RGB(0,0,255)
UsePen 3,5,@RGB(0,0,0)
Rectangle 0,0 - %maxx-20, %maxy-100
button_ende% = @Create("Button",%HWnd,"E N D E", %maxx -180,%maxy - 180,145,50)
button_auswerten% = @Create("Button",%HWnd,"Auswerten", %maxx -330,%maxy - 180,140,50)
button_löschen% = @Create("Button",%HWnd,"Löschen", %maxx -490,%maxy - 180, 150,50)
Rahmen%[1] = @Create("GroupBox",%HWnd," Stimmt es, dass die Herstellung einer Cola-Dose etwa gleich viel kostet, wie die Herstellung des Colas, das darin enthaltenen ist?",20,10,850,250)
Rahmen%[2] = @Create("GroupBox",%HWnd," Welches der unten genannten Lebensmittel enthält am meisten Eisen?",20,300,850,250)
Rahmen%[3] = @Create("GroupBox",%HWnd," Wodurch 'trocknet' Sekundenkleber?",20,600,850,250)
Rahmen%[4] = @Create("GroupBox",%HWnd," In welcher europäischen Stadt gibt es die meisten Brücken?",900,10,850,250)
Rahmen%[5] = @Create("GroupBox",%HWnd," Wovon bekommen wir die meiste radioaktive Strahlung ab?",900,300,850,250)
Rahmen%[6] = @Create("GroupBox",%HWnd," Was bekam man beim weltweit ersten Münzautomat für sein Geld?",900,600,850,250)
RadionButton%[1] = @Create("RadioButton",Rahmen%[1],"ja, beides kostet etwa gleich viel",10,75,300,25)
RadionButton%[2] = @Create("RadioButton",Rahmen%[1],"nein, das Cola ist teurer als die Dose",10,110,300,25)
RadionButton%[3] = @Create("RadioButton",Rahmen%[1],"nein, die Dose ist teurer als das Cola",10,145,300,25)'x
RadionButton%[4] = @Create("RadioButton",Rahmen%[2],"Schokolade",10,50,100,30)
RadionButton%[5] = @Create("RadioButton",Rahmen%[2],"Spinat",10,90,100,30)
RadionButton%[6] = @Create("RadioButton",Rahmen%[2],"Schokolade",10,130,100,30)'x
RadionButton%[7] = @Create("RadioButton",Rahmen%[3],"Wärme",10,50,100,30)
RadionButton%[8] = @Create("RadioButton",Rahmen%[3],"Feuchtigkeit",10,90,100,30)'x
RadionButton%[9] = @Create("RadioButton",Rahmen%[3],"Sauerstoff",10,130,100,30)
RadionButton%[10] = @Create("RadioButton",Rahmen%[4],"Hamburg",10,50,100,30)'x
RadionButton%[11] = @Create("RadioButton",Rahmen%[4],"Venedig",10,90,100,30)
RadionButton%[12] = @Create("RadioButton",Rahmen%[4],"Amsterdam",10,130,100,30)
RadionButton%[13] = @Create("RadioButton",Rahmen%[5],"von Atomkraftwerken und radioaktivem Abfall",10,50,500,30)
RadionButton%[14] = @Create("RadioButton",Rahmen%[5],"von zurückliegenden Atombomben-Tests",10,90,500,30)
RadionButton%[15] = @Create("RadioButton",Rahmen%[5],"von der natürlichen Strahlung der Erde",10,130,500,30)'x
RadionButton%[16] = @Create("RadioButton",Rahmen%[6],"Kaugummi",10,50,100,30)
RadionButton%[17] = @Create("RadioButton",Rahmen%[6],"Brot",10,90,100,30)
RadionButton%[18] = @Create("RadioButton",Rahmen%[6],"Wasser",10,130,100,30)'x
endproc
proc hauptprogramm_run
WhileNot @Clicked(button_ende%)
waitinput
if @GetFocus(button_auswerten%)
If GetCheck(RadionButton%[3]) = 1
'DrawIcon 4, 400,145, '-> richtig
EnableWindow RadionButton%[1], 0
EnableWindow RadionButton%[2], 0
EndIf
If GetCheck(RadionButton%[6]) = 1
EnableWindow RadionButton%[4], 0
EnableWindow RadionButton%[5], 0
EndIf
If GetCheck(RadionButton%[8]) = 1
EnableWindow RadionButton%[7], 0
EnableWindow RadionButton%[9], 0
EndIf
If GetCheck(RadionButton%[10]) = 1
EnableWindow RadionButton%[11], 0
EnableWindow RadionButton%[12], 0
EndIf
If GetCheck(RadionButton%[15]) = 1
EnableWindow RadionButton%[13], 0
EnableWindow RadionButton%[14], 0
EndIf
If GetCheck(RadionButton%[18]) = 1
EnableWindow RadionButton%[16], 0
EnableWindow RadionButton%[17], 0
EndIf
endif
Case %scankey = 27 : Break
EndWhile
endproc
proc hautprgramm_end
@DestroyWindow(%hwnd)
endproc
'Hauptprogramm
hauptprogramm_skin
hauptprogramm_run
hautprgramm_end
end
The Radiobuttons can Yes with one new game in of/ one Loop again enable. with different play must one hold everything in Arrays or lists hold(Fragetext, Answer, Solutions). with SetText RadionButton%[x], "neuer Text" or SetText welt%[1], "neue Frage" can you then The ask and Radiobutton-Texts Change.
but Perhaps has yet someone a idea. |
| | | Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 02/25/14 ▲ |
| |
| | diimool25 | thanks !
do you know Perhaps How I it hinbekomme the if I on delete click the because The makieungen The I made have lane weg ? |
| | | | |
| | H.Brill | simply with of/ one Loop and SetCheck ! so goes it : CompileMarkSeparation mach the in your Eventschleife moreover. |
| | | Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 02/25/14 ▲ |
| |
| | diimool25 | another question i want the itself before a messagebox opens and asks whether to the started wants so far have I it geschafft with Yes goes everything only if I No click opens itself the same again means I have it in Ner whilenot schleife so :
Clear end%
WhileNot end%
button% = @MessageBox ("Willst You, the quiz started?", "",292)
Case button% = 6 : end% = 1 EndWhile
How bekome I it there the if I on No click it itself closes ? |
| | | | |
| | Nico Madysa | Hi,
if You want, that The Messagebox only once appear, alike what the User dial, must the box not of/ one Loop his.
One better Ansatz would it, the quiz in a procedure To verlagern and the procedure aufzurufen, if the User "ja" dial. CompileMarkSeparation |
| | | | |
| | diimool25 | thanks |
| | | | |
| | diimool25 | How can I the make I still others ask can make means if I on enien button click open itself others ask ? |
| | | | |
| | diimool25 | thanks but have now yourself a ösung found |
| | | | |
| | diimool25 | can me of/ one say How I the can make the me said becomes you have 3 of 6 correctly. ? |
| | | | |
|
AnswerTopic-Options | 16.902 Views |
Themeninformationenthis Topic has 4 subscriber: |