Wie kann ich in einem GUICtrlCreateList einen Eintrag doppelt eintragen?
Ich mach das mit GUICtrlSetData($ListFeld1ToDo, GUICtrlRead($ComboFeld1))
das klappt soweit, der neue Eintrag anders ist als der Alte.
Ich habe eine Art ToDo- Liste die mit Werten aus einer Combobox gefüllt werden soll.
Ich habe in der Hilfe unter GUICtrlSetData() folgendes gefunden:
Für Combo oder List-Controls: Wenn "data" mit einem bereits existierenden
Eintrag übereinstimmt, wird dieser als Standard (default) verwendet.
Das könnte ein Hinweis sein das es nicht anders geht, das kann ich mir aber nicht vorstellen.
Gibt es vielleicht noch eine Alternative zu GUICtrlSetData ??
Hier mal mein Code:
$GrpFeld1 = GUICtrlCreateGroup("Feld 1", 20, 49, 243, 289)
$ComboFeld1 = GUICtrlCreateCombo("", 172, 113, 73, 25)
GUICtrlSetData(-1, "Einkaufen|Schlafen|Trinken|Schule|Fußball")
$ListFeld1ToDo = GUICtrlCreateList("", 36, 113, 89, 216)
$Label4 = GUICtrlCreateLabel("ToDo-Liste für Feld 1", 36, 89, 105, 18)
$LabelFeld1Eintragen = GUICtrlCreateLabel("<--", 140, 113, 18, 18)
GUICtrlSetOnEvent(-1,"test")
$LabelFeld1Austragen = GUICtrlCreateLabel("-->", 140, 145, 18, 18)
Func test()
GUICtrlSetData($ListFeld1ToDo, GUICtrlRead($ComboFeld1))
EndFunc