Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #SingleInstance, Force
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- SetWorkingDir, %A_ScriptDir%
- CoordMode, ToolTip, Window
- List := "1`tAardvark|2`tBaboon|3`tCaracal|4`tDingo|5`tElephant|6`tFrog|7`tGorilla"
- Gui, Add, Edit, x10 y8 w150 vDDListBox_Edit +hwndDDListBox_EditID ReadOnly
- Gui, DDListBox:Add, ListBox, x0 y0 w150 vDDListBox_List gDDListBox_Select r5 +BackgroundTrans, %List%
- GuiControl,, DDListBox_Edit, WORKS
- Gui, Show, h75
- OnMessage(0x201, "WM_LBUTTONDOWN")
- Return
- WM_LBUTTONDOWN(wParam, lParam) {
- GoSub, DDListBox_Show
- }
- DDListBox_Show:
- If (A_GuiControl = "DDListBox_Edit") {
- WinGetPos, ClientPosX, ClientPosY
- Gui, DDListBox:Show, x%ClientPosX% y%ClientPosY% NA
- }
- Return
- DDListBox_Select:
- Gui, DDListBox:Submit
- MsgBox % DDListBox_List
- GuiControl,, DDListBox_Edit, FAILS ;%DDListBox_List% ;; <--- This line fails to put text into box
- Return
- GuiClose:
- ExitApp
RAW Paste Data