Moin Moin zusammen. Ich habe mich heute nacht im Bett gefragt, wie man am besten Checkboxen auswerten kann.
Mit vier Checkboxen wäre das eine Idee, die mir nur so im Kopf herum flog.
Was spricht gegen diese Art der Auswertung? Was dafür?
Ich würde mich freuen Eure Meinung zu lesen.
Spoiler anzeigen
#include <GUIConstantsEx.au3>
GUICreate("Checkboxauswertung ",140,100)
[/autoit] [autoit][/autoit] [autoit]$1 = GUICtrlCreateCheckbox("Box 1", 10, 10)
$2 = GUICtrlCreateCheckbox("Box 2", 10, 30)
$3 = GUICtrlCreateCheckbox("Box 3", 10, 50)
$4 = GUICtrlCreateCheckbox("Box 4", 10, 70)
$Button = GUICtrlCreateButton("OK",75,20,50,50)
GUICtrlSetState(-1, $GUI_FOCUS) ; "OK" - Button im Fokus
GUISetState()
Example()
Func Example()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Button
$comboaktiv_1 = GUICtrlRead($1)
$comboaktiv_2 = GUICtrlRead($2)
$comboaktiv_3 = GUICtrlRead($3)
$comboaktiv_4 = GUICtrlRead($4)
$ted = $comboaktiv_1 & $comboaktiv_2 & $comboaktiv_3 & $comboaktiv_4
if $ted ="1444" then MsgBox(0, "Checkboxauswertung","Checkbox 1 ist alleine aktiv")
If $ted ="4144" then MsgBox(0, "Checkboxauswertung","Checkbox 2 ist alleine aktiv")
If $ted ="1144" then MsgBox(0, "Checkboxauswertung","Checkbox 1 und 2 sind aktiv") ;
If $ted ="4414" then MsgBox(0, "Checkboxauswertung","Checkbox 3 ist alleine aktiv")
If $ted ="1414" then MsgBox(0, "Checkboxauswertung","Checkbox 1 und 3 sind aktiv")
If $ted ="4114" then MsgBox(0, "Checkboxauswertung","Checkbox 2 und 3 sind aktiv")
If $ted ="1114" then MsgBox(0, "Checkboxauswertung","Checkbox 1 bis 3 sind aktiv")
If $ted ="4441" then MsgBox(0, "Checkboxauswertung","Checkbox 4 ist alleine aktiv")
If $ted ="1441" then MsgBox(0, "Checkboxauswertung","Checkbox 1 und 4 sind aktiv")
If $ted ="4141" then MsgBox(0, "Checkboxauswertung","Checkbox 2 und 4 sind aktiv")
If $ted ="1141" then MsgBox(0, "Checkboxauswertung","Checkbox 1, 2 und 4 sind aktiv")
If $ted ="4411" then MsgBox(0, "Checkboxauswertung","Checkbox 3 und 4 sind aktiv")
If $ted ="1411" then MsgBox(0, "Checkboxauswertung","Checkbox 1, 3 und 4 sind aktiv")
If $ted ="4111" then MsgBox(0, "Checkboxauswertung","Checkbox 2, 3 und 4 sind aktiv")
If $ted ="1111" then MsgBox(0, "Checkboxauswertung","Checkbox 1 bis 4 sind aktiv")
If $ted ="4444" then MsgBox(0, "Checkboxauswertung","Es ist keine Checkbox aktiv")
EndSelect
WEnd
EndFunc
Berichtigt. ich meine na klar: Checkboxen