|
-
Mar 27th, 2000, 09:28 AM
#1
Thread Starter
Member
Is it possiple to activate the listbox double_click event without clicking on an added item. i.e. if the user dbl clicks anywhere in the listbox. I can only get the event if I dbl click on an added item.
-
Mar 27th, 2000, 09:41 AM
#2
Hyperactive Member
[Oops... double]
[Edited by Gen-X on 03-27-2000 at 09:45 PM]
-
Mar 27th, 2000, 09:43 AM
#3
Hyperactive Member
Here's the lowdown :
Click
Runs when you press the left mouse button once while ANYWHERE inside the listbox. The first thing it does before running the code for listbox_click() is to make the item currently beneath the mouse pointer the currently selected item (ie listbox.listindex = X). Once that has been done it will then execute the code set for the click
Change
Runs when listbox.listindex changes (NOTE: Also run when the form is initialized). If you click on an item that is already selected the Click event will run but the Change event will not. This code is only executed when the actual value changes.
]DblClick
Here's the catch. A double click is basically 2 SINGLE clicks in quick succession. Therefor you CANNOT do a double click without at least causing the listbox to consider your first click as repositioning the selected item in the listbox but then instead of executing the listbox_click() event it picks up that a second click has occured and runs the listbox_dblclick() instead.
These things cannot be avoided because some events are beyond the control of the user and one of the limitations of the listbox is that a click does something before it runs the preferred code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|