Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drag and Drop Question
Message
From
29/10/1997 16:26:51
Edward Crawford
City Facilities Management
Glasgow, United Kingdom
 
 
To
29/10/1997 15:38:30
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00057264
Message ID:
00057286
Views:
33
>>I have two list boxes. One list box has a list of account numbers. The second list box is made up of people associated with each account. If you move to a different account, the people change with the account. I want to be able to click on a person and drag them over to another account and drop them into a different account. The problem is when I drag the item to the other listbox, how can I find out what ListItem the cursor is over so that I know what account to assign this person in the DragDrop method?
>>
>>-Ed

Ed

Do I need to check for this condidtion?
>mouse click at nYCoord+20,nXCoord pixels
I am haveing no luck. If I select an item in list 2, Wait window yields the selected account number no matter where I try to drop the item. If I don't select anything in list 2, Wait window yields nothing.

Here is what I have:
***********************
Source - MouseDown Event

thisform.mousex = nXCoord
thisform.mousey = nYCoord

********************
Source: MouseMove Event

IF nButton = 1 && Left Mouse
IF ABS(nXCoord - THIS.PARENT.MouseX) > ;
THIS.Parent.DragThreshold OR ;
ABS(nYCoord - THIS.PARENT.MouseY) > ;
THIS.Parent.DragThreshold
thisform.mailbox = this.List(this.ListItemId)
THIS.Drag
ENDIF
ENDIF

*************
SOURCE and Target: DragOver Event

DO CASE
CASE nState = 0 && Enter
this.DragIcon = THIS.Parent.CanDropIcon
CASE nState = 1 && Leave
this.DragIcon = THIS.Parent.NoDropIcon
ENDCASE

**************
Target: DragDrop Event

thisform.tmr1.Enabled = .T.

**********

-Ed
thisform.tmr1 Timer Event

WAIT WINDOW thisform.lst1.Value NOWAIT
this.Enabled = .F.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform