Jeannot40
Joined: 19 Jul 2008 Posts: 4
|
Posted: Sun Jul 20, 2008 12:14 am Post subject: [solved]LisBox : how to detect a double click ? |
|
|
Hi all
I am trying to do a menu in a ListBox and i should that the items can be choosen by a double click; but i cannot detect the double click with my code :
| Code: |
#NoTrayIcon
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
items = menu1|menu2|menu3
;init window
Gui, Font, S12 CDefault, Arial
Gui, Add, Text, x6 y10 w250 h20, Choose an Application
Gui, Add, ListBox, vChoice gDbleClick w500 h300 hscroll vscroll AltSubmit
Gui, Add, Button, vSend gValideMenu x110 y340 w60 h21 +Default, &Send
Gui, Add, Button, vCancel gGuiClose x260 y340 w60 h21, Cancel
Gosub ShowMainWindow
Escape::
Gosub GuiClose
return
ShowMainWindow:
GuiControl, , Choice, %items%
Gui, Show,, Mainmenu
return
DbleClick:
if %A_GuiEvent%="DoubleClick"
MsgBox %A_EventInfo%
return
ValideMenu:
Gui, submit,
GuiControlGet, Choice
items = |appli1 menu%Choice%|appli2 menu%Choice%|appli3 menu%Choice%
Gosub ShowMainWindow
return
GuiClose:
Gui cancel
GuiEscape:
ExitApp
|
help me please; i'm beginner
Last edited by Jeannot40 on Sun Jul 20, 2008 2:15 am; edited 1 time in total |
|