Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drag and drop from a list box
Message
De
24/06/1999 09:56:46
 
 
À
23/06/1999 17:13:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00232678
Message ID:
00233475
Vues:
36
Dragicon is what I was looking for, thanks man! Is the following "paradigm" pretty much the standard way of allowing multiple (.multiselect = .t.) listitems from a listbox and dropping them into another listbox?

1. list1.multiselect = .t.
2. list1.mousedown event starts dragging
3. list2.dragdrop event scans list1 for the items selected and uses them to populate an array.
4. list2.requery is called

Good? Bad? Is there a better way?

>If you want to change the look of the icon used for dragging, you can use a different ico file specified with DragIcon. I'm not sure what you mean by define a custom cursor.
>
>>That would work. But it still drags the outline of the entire list box into the new list box. Do I need to define a custom cursor?
>>
>>>>I would like to be able to drag a listitem from a list box and drop it into another listbox. My problem is that the drag and drop stuff looks like it wants to affect the entire listbox, not just the list item. How can I just drag just the selected item(s) from the source listbox?
>>>
>>>You use the object reference that the Drop operation gives you to get to the source list's ListIndex or Value property,
>>>
>>>LPARAMETERS oSource, nXCoord, nYCoord
>>>THIS.AddItem(oSource.Value)
--Todd Sherman
-Wake Up! Smell the Coffee!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform