AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How can I detect that a listbox item was "double clicke

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
brahk



Joined: 22 Mar 2009
Posts: 15

PostPosted: Mon Mar 30, 2009 9:03 pm    Post subject: How can I detect that a listbox item was "double clicke Reply with quote

Does anyone have a simple example of a small list box where a double click is used to select an item?

I am new to AHK and have not been able to figure this out via multiple attempts.

Thanks,
Brad
Back to top
View user's profile Send private message
aCkRiTe



Joined: 21 Jul 2006
Posts: 555

PostPosted: Mon Mar 30, 2009 9:10 pm    Post subject: Reply with quote

Here is an example that might help you, but its just a single click, not double.

Code:

Gui, Add, ListBox, vColorChoice gSubroutine, Red|Green|Blue|Black|White
Gui, Show
Return

Subroutine:
Gui, Submit, NoHide
MsgBox, %ColorChoice%
Return

_________________

HTH...
Back to top
View user's profile Send private message
soccer18soccer18



Joined: 18 Nov 2008
Posts: 101

PostPosted: Mon Mar 30, 2009 9:26 pm    Post subject: Reply with quote

Gui, Add, ListBox, vColorChoice gSubroutine, Red|Green|Blue|Black|White
Gui, Show
Return

Subroutine:
if A_GuiEvent = DoubleClick
LV_GetText(RowText, A_EventInfo)
msgbox, %RowText%
return
Back to top
View user's profile Send private message
brahk



Joined: 22 Mar 2009
Posts: 15

PostPosted: Mon Mar 30, 2009 9:28 pm    Post subject: Reply with quote

Thank You VERY much for the quick reply.

Now that I see your example, it all makes sense!

Brad
Back to top
View user's profile Send private message
Lighthouse



Joined: 12 Jan 2009
Posts: 55
Location: Southern Ca, USA

PostPosted: Mon Mar 30, 2009 9:29 pm    Post subject: Reply with quote

Don't forget the brackets.


Code:
Gui, Add, ListBox, vColorChoice gSubroutine, Red|Green|Blue|Black|White
Gui, Show
Return

Subroutine:
if A_GuiEvent = DoubleClick
{
    LV_GetText(RowText, A_EventInfo)
    msgbox, %RowText%
}
return

Back to top
View user's profile Send private message
jaco0646



Joined: 07 Oct 2006
Posts: 3113
Location: MN, USA

PostPosted: Mon Mar 30, 2009 9:52 pm    Post subject: Reply with quote

The LV_ functions are only for ListView controls, not ListBoxes or anything else.
Code:
Gui, Add, ListBox, vColorChoice gSubroutine, Red|Green|Blue|Black|White
Gui, Show
Return

Subroutine:
if A_GuiEvent = DoubleClick
{
    Gui, Submit, NoHide
    msgbox, %ColorChoice%
}
return
Back to top
View user's profile Send private message Visit poster's website
Lighthouse



Joined: 12 Jan 2009
Posts: 55
Location: Southern Ca, USA

PostPosted: Mon Mar 30, 2009 10:25 pm    Post subject: Reply with quote

Good to know Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group