AutoIt
#include <GuiConstants.au3> #include <GuiCombo.au3> Opt('MustDeclareVars',1) Dim $Combo, $Btn_Delete, $Btn_Exit, $msg, $Btn_Add, $gg GuiCreate("ComboBox String", 392, 204) $Combo = GuiCtrlCreateCombo("", 70, 10, 270, 110,$CBS_SIMPLE) $Btn_Delete = GuiCtrlCreateButton("Delete String", 35, 120, 90, 30) $Btn_Add = GuiCtrlCreateButton("Add String", 145, 120, 90, 30) GUICtrlSetData($Combo,"B|C|D|E|F") $Btn_Exit = GuiCtrlCreateButton("Exit", 255, 120, 90, 30) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $Btn_Exit ExitLoop Case $msg = $Btn_Delete If(_GUICtrlComboGetCurSel($Combo) <> $CB_ERR) Then _GUICtrlComboDeleteString($Combo,_GUICtrlComboGetCurSel($Combo)) EndIf Case $msg = $Btn_Add If(_GUICtrlComboGetCurSel($Combo) <> $CB_ERR) Then _GUICtrlComboAddString($Combo,$gg = _GUICtrlComboGetCurSel($Combo)) GUICtrlSetData($Combo,$gg) endif EndSelect WEnd Exit




