Synthesis Posted September 27, 2009 Share Posted September 27, 2009 (edited) How can I delete an element from a combobox? I mean I have in the combo with the elements : alfa beta gamma delta And I want to delete gamma. The _GUICtrlComboBox_DeleteString doesn't work as I want. :| Found out.. my mistake.. Edited September 27, 2009 by Nephentes Link to comment Share on other sites More sharing options...
GodlessSinner Posted September 27, 2009 Share Posted September 27, 2009 Gamma item have index 2 (started form zero(alfa)), this works: #include <GUIComboBox.au3> #include <Constants.au3> #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 508, 91, 239, 158) $Del = GUICtrlCreateButton("Delete item named as Gamma", 224, 24, 265, 33, $WS_GROUP) $Combo1 = GUICtrlCreateCombo("", 8, 24, 209, 25) GUICtrlSetData(-1, "alfa|beta|gamma|delta", "alfa") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $Del _GUICtrlComboBox_DeleteString($Combo1, 2) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd _____________________________________________________________________________ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now