J
John Dann
This question has arisen from an earlier thread but is really a
separate issue:
I have a VB.Net listbox control on a form. I want to be able to do 2
things with items displayed within the one listbox.
1. Reorder items using drag and drop with the mouse.
2. Delete items eg by double-clicking or some other mouse-related
action.
I can get each of these two processes working separately by handling
the MouseDown (as a signal to initiate the drag process) and
DoubleCLick events respectively, but not both together. I'm guessing
that the MouseDown event is fired whenever the mouse is clicked on the
listbox and Windows has no way of distinguishing MouseDown from eg the
start of a doubleclick. With the MouseDown event handled I can no
longer even select items on the listbox.
Anyone agree/disagree with this guess and able to suggest a workaround
please? I suppose also that this complication has maybe arisen because
of wanting to perform multiple mouse actions on the same control -
Drop/Drag often relates to moving data to a different control when the
same issue doesn't necessarily arise. Or am I missing some obvious
solution?
Thanks
JGD
separate issue:
I have a VB.Net listbox control on a form. I want to be able to do 2
things with items displayed within the one listbox.
1. Reorder items using drag and drop with the mouse.
2. Delete items eg by double-clicking or some other mouse-related
action.
I can get each of these two processes working separately by handling
the MouseDown (as a signal to initiate the drag process) and
DoubleCLick events respectively, but not both together. I'm guessing
that the MouseDown event is fired whenever the mouse is clicked on the
listbox and Windows has no way of distinguishing MouseDown from eg the
start of a doubleclick. With the MouseDown event handled I can no
longer even select items on the listbox.
Anyone agree/disagree with this guess and able to suggest a workaround
please? I suppose also that this complication has maybe arisen because
of wanting to perform multiple mouse actions on the same control -
Drop/Drag often relates to moving data to a different control when the
same issue doesn't necessarily arise. Or am I missing some obvious
solution?
Thanks
JGD