Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drag and drop from a listbox
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00208784
Message ID:
00209077
Views:
27
>Hi,
> I would like to drag an item from a listbox to an object and drop it. I've downloaded Nigel Coates' dragdrop class from the files section, but it doesn't make a lot of sense to me. Can anyone guide me in the right direction?
>
>Thanks!

Here is a simple version (this also assumes you are talking about Native VFP DragDrop, NOT OLE drag drop.

Set the DragMode of the listbox to .T.

In the DragDrop method of the object that is being dropped ON, you are passed an object called oSource, which is an object reference to what was dropped on it. Put the following code in the DragDrop method.

wait wind oSource.Value

When you drag the listbox onto the object, the value of the highlighted item in the listbox will be shown
Rick Hodder
MCP Visual Foxpro
C#, VB.NET Developer
Independent Consultant
www.RickHodder.com
MyBlog
Previous
Reply
Map
View

Click here to load this message in the networking platform