LindaRichard
Programmer
Hi,
I want to drag a list item from a listbox to a textbox
In my listbox I place the following code in the
mousedown event
LPARAMETERS nButton, nShift, nXCoord, nYCoord
this.Drag(1)
and in the dragdrop event of the text box
LPARAMETERS oSource, nXCoord, nYCoord
this.value=osource.list(osource.listindex)
The drag property is set to manual and I set an arrow in the drag icon property.
My problem is with the behaviour.
Let say I have a list of items aitem,bitem,citem,ditem,eitem,fitem...
I click on bitem, the drag arrow appears, I hold the mouse down
without moving and the item is selected.
Then I click the eitem in the list, the drag arrow appears I start moving then drop a
bitem in the list box. I would have liked the eitem to be dropped not the bitem.
The problem is when I start dragging the eitem it's
not immediatly selected only when the click event is fired.
I want to avoid having two steps, first click, then drag. I would like the user to be
able to select an item then drag it in one try. I also want to maintain the users
ability to simply pick an item in the list
Anyone have any suggestions on how this can be done?
Thanks
Linda
I want to drag a list item from a listbox to a textbox
In my listbox I place the following code in the
mousedown event
LPARAMETERS nButton, nShift, nXCoord, nYCoord
this.Drag(1)
and in the dragdrop event of the text box
LPARAMETERS oSource, nXCoord, nYCoord
this.value=osource.list(osource.listindex)
The drag property is set to manual and I set an arrow in the drag icon property.
My problem is with the behaviour.
Let say I have a list of items aitem,bitem,citem,ditem,eitem,fitem...
I click on bitem, the drag arrow appears, I hold the mouse down
without moving and the item is selected.
Then I click the eitem in the list, the drag arrow appears I start moving then drop a
bitem in the list box. I would have liked the eitem to be dropped not the bitem.
The problem is when I start dragging the eitem it's
not immediatly selected only when the click event is fired.
I want to avoid having two steps, first click, then drag. I would like the user to be
able to select an item then drag it in one try. I also want to maintain the users
ability to simply pick an item in the list
Anyone have any suggestions on how this can be done?
Thanks
Linda