Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drag/Drop to a form
Message
From
02/11/2000 17:47:47
 
 
To
01/11/2000 10:22:07
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00436677
Message ID:
00437439
Views:
21
>My app uses drag/drop quite successfully, allowing users to drag, for example, a student name from one form and drop it on a grid of class attendees on another, thus registering that student for the class.
>
>I want the user to be able to drop the student name on a page on a form, rather then on a specific control. I can do this by putting the drop code in every control on the page, but this is a bit messy. I tried putting an invisble shape covering the page - this works for the drop, but of course the shape now prevenst me from accessing the controls beneath it. If I send the shape to the bottom, then the controls which are now on top of the shape hide the shape, and the drop does not work.
>
>I don't really mind putting the code on all the controls, but I'm wondering if there is a neater way.
>
>Larry

In each of your control's super classes (i.e., the one-off native base classes you created and are subclassing from), call up to the parent's DragDrop() event.
e.g.
LPARAMETERS oSource, nXCoord, nYCoord

IF PEMSTATUS(this.Parent, "DragDrop", 5)
  this.parent.DragDrop(oSource, nXCoord, nYCoord)
ENDIF
Then you can put the desired code in just your form or page or container, and not have to worry about moving objects around in the ZOrder.
And you don't have to put the code in each individual object, unless you need that control's DragDrop() to do something special.
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform