Jump to content
Sign in to follow this  
motionman95

Double-click detection with ListBox

Recommended Posts

motionman95

Hello everyone! I'm trying to detect double-clicks on items in a ListBox. The only problem is that what I find using the search feature is always for the ListView, and I haven't been able to find one that isn't. Is there a method to detect double-clicks in a listbox? Thanks!


Share this post


Link to post
Share on other sites
motionman95

Whoops, hee hee...thanks!


Share this post


Link to post
Share on other sites
AdmiralAlkex

Thanks again, AdmiralAlkex. I have 1 other problem: My listbox keeps displaying items in alphabetical order, despite the order I arrange them in. Is there a way to keep it from doing that?

If you look in the helpfile for ListBox on the "style parameter" you will see that $LBS_SORT is one of the default values, which as you may guess, makes it sort the items for you. To override the default give it some other styles, something like this:

(assuming you want all the defaults but not the sort)

GUICtrlCreateList("some text", left, top , width , height , BitOr($WS_BORDER, $WS_VSCROLL))

Or:

_GUICtrlListBox_Create($hWnd, "some text", $iX, $iY, $iWidth = 100, $iHeight = 200, BitOr($WS_HSCROLL, $WS_VSCROLL, $WS_BORDER))

:D

Share this post


Link to post
Share on other sites
motionman95

I've fixed it already using just:

GUICtrlCreateList("some text", left, top , width , height , 0)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×