dragging from listbox

A

AliKwok

Hi

I wonder if anyone can help me: I have a simulated 'roll-your-own' drag&drop
working OK with a Listbox as drag source and msflexgrid as drop target.
The only problem is that the listbox's selected row keeps changing as the
mouse is moved over the form, because of course the listbox retains the focus
as long as the mouse button is depressed ('drag' having been initiated by the
'mousedown' event). I've tried putting a '[lisbox].locked' statement in its
'MouseMove' event handler but it achieves nothing.

Any thoughts would be much appreciated.

Ali Kwok
 
A

AliKwok

Hi, thanks for your attention

The msFlexgrid is on the same page of the same tabcontrol onthe same form as
the listbox. All that needs to occur is that the ID of the list item (bound
column) is used to update a record depending on where the mouse 'lands' on
the flexgrid (using its 'MouseRow' and 'MouseColumn' properties). That works
OK, EXCEPT that any up/down mouse movement relative to the listbox changes
its selection during the "drag" (ie between listbox MouseDown and MouseUp
events).

I hope I have made it clearer.

Thankyou

Ali

mscertified said:
Where/what are you dragging to?



AliKwok said:
Hi

I wonder if anyone can help me: I have a simulated 'roll-your-own' drag&drop
working OK with a Listbox as drag source and msflexgrid as drop target.
The only problem is that the listbox's selected row keeps changing as the
mouse is moved over the form, because of course the listbox retains the focus
as long as the mouse button is depressed ('drag' having been initiated by the
'mousedown' event). I've tried putting a '[lisbox].locked' statement in its
'MouseMove' event handler but it achieves nothing.

Any thoughts would be much appreciated.

Ali Kwok
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top