Hallo,
ich bin beim rumbasteln mal wieder auf ein problem gestoßen.
ich wollte eine combobox mit variablen inhalt machen. den inhalt wollte ich über radio buttons ändern.
mein code sieht bis jetzt so aus :
C
#RequireAdmin
#include <GUIConstants.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <String.au3>
Opt("GUIOnEventMode", 1)
GUICreate("Auswahl", 300, 75)
$combo = GUICtrlCreateCombo("", 25, 5, 250, 20)
GUICtrlSetData($combo, "")
GUICtrlSetOnEvent($combo, "_comboread")
GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")
$radio1 = GUICtrlCreateRadio("Ja", 100, 40, 45, 20)
$radio2 = GUICtrlCreateRadio("Nein", 150, 40, 45, 20)
GUICtrlSetState($radio1, $GUI_CHECKED)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED
GUICtrlSetData($combo, "|John|Tom|Anja|Ken|Joe|Sophie|")
Case $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED
GUICtrlSetData($combo, "|Tom|Joe|Ken|")
Sleep(10000)
EndSwitch
WEnd
Func _comboread()
$read = GUICtrlRead($combo)
;fehlt noch,aber tut noch nichts zur sache
EndFunc ;==>_comboread
Func _exit()
Exit
EndFunc ;==>_exit
Alles anzeigen
bei dem code kämen später 4 radio buttons hin,oder irgendwas,mitdem ich das ändern kann.der rest des codes was passiert,wenn der teil ausgewählt ist fehlt noch.
zur zeit sieht es so aus das es übelst flackert wenn ich das so mach,bzw nur der button richtig geht,de in der while schleife weiter oben ist.
hat jemand einen tipp wie ich das am besten verwirklichen kann?
wäre für jede hilfe dankbar