Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.47 KB | None | 0 0
  1. #include <ComboConstants.au3>
  2. #include <GuiComboBoxEx.au3>
  3. #include <GUIConstantsEx.au3>
  4.  
  5. $hGUI = GUICreate("", 200, 40)
  6. $Combo = GUICtrlCreateCombo("item1", 10, 10, 180, 100, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))
  7. GUICtrlSetData(-1, "item2|item3", "item3")
  8. GUISetState()
  9.  
  10. While 1
  11.     Switch GUIGetMsg()
  12.         Case $GUI_EVENT_CLOSE
  13.             Exit
  14.         Case $Combo
  15.             MsgBox(262144, "Test", "Index = " & _GUICtrlComboBoxEx_GetCurSel(GUICtrlGetHandle($Combo)))
  16.     EndSwitch
  17. WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement