回复 1# sd23
_GUICtrlListBox_DeleteString()是操作下拉列表框的,而不是组合列表框,应用
_GUICtrlComboBox_DeleteString()#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiListBox.au3>
#include <GuiComboBox.au3>
#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 430, 209, 192, 124)
$Combo1 = GUICtrlCreateCombo("Combo1", 80, 72, 145, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "aa|bb|cc|dd|ee|ff")
$Button1 = GUICtrlCreateButton("删除", 264, 72, 75, 25)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$a1 = _GUICtrlComboBox_GetCurSel($Combo1)
_GUICtrlComboBox_DeleteString($Combo1, $a1)
_GUICtrlComboBox_SetCurSel($Combo1, 0)
EndSwitch
WEnd
|