Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drag and drop from a listbox
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00208784
Message ID:
00209077
Vues:
26
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform