Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drag and Drop from Grid?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00094802
Message ID:
00094830
Vues:
26
>>Has anyone worked out a way to drag and drop an item from a grid (or perhaps a list box) to another object (in this case another grid) so I can figure out which record it was dragged from? The grid row it is dragged TO is not important, in this case. I just wanna add items to a grid by dragging them from another grid (or something that looks and acts like that)?
>>
>>TIA
>>
>>Michael
>
>Michael, it is not a big deal to DragDrop from Listbox since you know what is the current ListBox.Value, or DisplayValue
>
>*Listbox.MouseMove
>LPARAMETERS nButton, nShift, nXCoord, nYCoord
>if nButton = 1
>This.Drag()
>endif
>
>What about dragging from the grid, I actually drag not the textbox in the grid column, but invisible label on the form. Label has the proper DragIcon property.
>
> **** grid.column1.textbox1.MouseDown()
> LPARAMETERS nButton, nShift, nXCoord, nYCoord
> thisform.lblDrag.tag = anyValueIwantToCarry && Record ID, field value or specific code or whatever
> NODEFAULT
>
> **** grid.column1.textbox1.MouseMove()
> LPARAMETERS nButton, nShift, nXCoord, nYCoord
> NODEFAULT
>
> **** grid.MouseMove()
> LPARAMETERS nButton, nShift, nXCoord, nYCoord
> IF nButton = 1
> *next two lines are to move label in proper position to start Drag from
> Thisform.lblDrag.Left = nXCoord
> Thisform.lblDrag.Top = nYCoord
> Thisform.lblDrag.Drag()
> ENDIF
>
>HTH,
>
>Nick

Actually a sample Drag and Drop List Box is available and is shipped with VFP system and is ready to use. I do not know on list box
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform