Jump to content

Double-click detection with ListBox


Recommended Posts

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!

Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...