DChambers Posted March 10, 2014 Share Posted March 10, 2014 Anyone have a script to create a GUI that would allow me to add entries in a combobox ? Link to comment Share on other sites More sharing options...
kylomas Posted March 11, 2014 Share Posted March 11, 2014 DChambers, Yes, directly from the Help file... expandcollapse popup#include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Example() Func Example() ; Create a GUI with various controls. Local $hGUI = GUICreate("Example", 300, 200) ; Create a combobox control. Local $iComboBox = GUICtrlCreateCombo("Item 1", 10, 10, 185, 20) Local $iClose = GUICtrlCreateButton("Close", 210, 170, 85, 25) ; Add additional items to the combobox. GUICtrlSetData($iComboBox, "Item 2|Item 3", "Item 2") ; Display the GUI. GUISetState(@SW_SHOW, $hGUI) Local $sComboRead = "" ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $iClose ExitLoop Case $iComboBox $sComboRead = GUICtrlRead($iComboBox) MsgBox($MB_SYSTEMMODAL, "", "The combobox is currently displaying: " & $sComboRead, 0, $hGUI) EndSwitch WEnd ; Delete the previous GUI and all controls. GUIDelete($hGUI) EndFunc ;==>Example If this is not what you need than be more explicit with your question. It also helps to post whatever code you have tried. good Luck, kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill 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