Index
1999-11-16 19:20 – Jack Skelley : VFP6: Drag and Drop Methods
1999-11-16 20:41 – Anders Altberg : Re: VFP6: Drag and Drop Methods
1999-11-17 08:04 – Brad Jones : RE: VFP6: Drag and Drop Methods
1999-11-17 09:14 – allister.chambers@fleetlease.co.uk: RE: VFP6: Drag and Drop Methods
1999-11-17 13:24 – Jack Skelley : Re: VFP6: Drag and Drop Methods
1999-11-17 14:52 – Brad Jones : RE: VFP6: Drag and Drop Methods
1999-11-17 15:21 – Jack Skelley : Re: VFP6: Drag and Drop Methods
Back to top
VFP6: Drag and Drop Methods

Author: Jack Skelley

Posted: 1999-11-16 19:20:33   Link

Good Evening All:

I would like to populate some text boxes on a form by selecting an item

from a combobox and drop it on the text box.

In the click event of the combobox I issue:

gcDrop_value = gaCountry(thisform.combo1.listindex,1) &&select the country

thisform.combo1.drag(1) &&initiate the drag

In the dragicon event I set the mouse pointer to a pen.

In the dragover event of the textbox I have the following:

thisform.combobox1.drag(2) &&drop the control

thisform.text2.value = gcDrop_value

thisform.refresh()

This seems to work but doesn't work like a true drag and drop. The mouse

doesn't need to be held down for the icon to change to a pen. And I don't

need to release the mouse in the textbox but as soon as the pen enters the

textbox the value appears in the textbox.

How do you create a *true* drag and drop? I have tried most combinations

and can't make it work the way I want.

Thanks for your help.

Jack Skelley

skelley@newjerseydevils.com

©1999 Jack Skelley
Back to top
Re: VFP6: Drag and Drop Methods

Author: Anders Altberg

Posted: 1999-11-16 20:41:15   Link

Jack

Use the OLEDDrag&Drop methods and events instead.

There are some good examples in the FFC, for instance in the Mover classes.

-Anders

----- Original Message -----

From: Jack Skelley <skelley@newjerseydevils.com>

To: Multiple recipients of ProFox <profox@leafe.com>

Sent: onsdag den 17 november 1999 01:20

Subject: VFP6: Drag and Drop Methods

| Good Evening All:

| I would like to populate some text boxes on a form by selecting an item

| from a combobox and drop it on the text box.

| In the click event of the combobox I issue:

| gcDrop_value = gaCountry(thisform.combo1.listindex,1) &&select the

country

|

| thisform.combo1.drag(1) &&initiate the drag

| In the dragicon event I set the mouse pointer to a pen.

|

| In the dragover event of the textbox I have the following:

| thisform.combobox1.drag(2) &&drop the control

| thisform.text2.value = gcDrop_value

| thisform.refresh()

| This seems to work but doesn't work like a true drag and drop. The mouse

| doesn't need to be held down for the icon to change to a pen. And I don't

| need to release the mouse in the textbox but as soon as the pen enters the

| textbox the value appears in the textbox.

| How do you create a *true* drag and drop? I have tried most combinations

| and can't make it work the way I want.

| Thanks for your help.

|

| Jack Skelley

| skelley@newjerseydevils.com

|

|

|

©1999 Anders Altberg
Back to top
RE: VFP6: Drag and Drop Methods

Author: Brad Jones

Posted: 1999-11-17 08:04:08   Link

Jack, is there a reason that you don't have the drag object (combobox) set

to Automatic and the drop object (textbox) setup to receive? Doing so makes

drag-n-drop work as expected.

combobox.OleDragMode = 1 && automatic

textbox.OleDropMode = 1 && enabled

--Brad

> -----Original Message-----

> From: profox@leafe.com [mailto:profox@leafe.com]On Behalf Of Jack

> Skelley

> Sent: Tuesday, November 16, 1999 7:21 PM

> To: Multiple recipients of ProFox

> Subject: VFP6: Drag and Drop Methods

>

>

> Good Evening All:

> I would like to populate some text boxes on a form by selecting an item

> from a combobox and drop it on the text box.

> In the click event of the combobox I issue:

> gcDrop_value = gaCountry(thisform.combo1.listindex,1) &&select

> the country

>

> thisform.combo1.drag(1) &&initiate the drag

> In the dragicon event I set the mouse pointer to a pen.

>

> In the dragover event of the textbox I have the following:

> thisform.combobox1.drag(2) &&drop the control

> thisform.text2.value = gcDrop_value

> thisform.refresh()

> This seems to work but doesn't work like a true drag and drop. The mouse

> doesn't need to be held down for the icon to change to a pen. And I don't

> need to release the mouse in the textbox but as soon as the pen enters the

> textbox the value appears in the textbox.

> How do you create a *true* drag and drop? I have tried most combinations

> and can't make it work the way I want.

> Thanks for your help.

>

> Jack Skelley

> skelley@newjerseydevils.com

>

>

>

©1999 Brad Jones
Back to top
RE: VFP6: Drag and Drop Methods

Author: allister.chambers@fleetlease.co.uk

Posted: 1999-11-17 09:14:23   Link

Jack,

Rather than using the DragOver event of the textbox, try using the DragDrop

event. The DragOver event fires whilst the mouse is being moved over the

textbox, whilst the dragdrop event will only fire when the mouse button is

released.

You could also write, in DragDrop

lparameters toDroppedObject && VFP has its own default

for this

this.value = gaCountry(toDroppedObject.listindex,1)

HTH

Allister.

-----Original Message-----

From: Jack Skelley [mailto:skelley@newjerseydevils.com]

Sent: 17 November 1999 00:21

To: Multiple recipients of ProFox

Subject: VFP6: Drag and Drop Methods

Good Evening All:

I would like to populate some text boxes on a form by selecting an item

from a combobox and drop it on the text box.

In the click event of the combobox I issue:

gcDrop_value = gaCountry(thisform.combo1.listindex,1) &&select the country

thisform.combo1.drag(1) &&initiate the drag

In the dragicon event I set the mouse pointer to a pen.

In the dragover event of the textbox I have the following:

thisform.combobox1.drag(2) &&drop the control

thisform.text2.value = gcDrop_value

thisform.refresh()

This seems to work but doesn't work like a true drag and drop. The mouse

doesn't need to be held down for the icon to change to a pen. And I don't

need to release the mouse in the textbox but as soon as the pen enters the

textbox the value appears in the textbox.

How do you create a *true* drag and drop? I have tried most combinations

and can't make it work the way I want.

Thanks for your help.

Jack Skelley

skelley@newjerseydevils.com

**********************************************************************

This email and any files transmitted with it are confidential and

intended solely for the use of the individual or entity to whom they

are addressed. If you have received this email in error please notify

the system manager.

This footnote also confirms that this email message has been swept by

MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com

**********************************************************************

©1999 allister.chambers@fleetlease.co.uk
Back to top
Re: VFP6: Drag and Drop Methods

Author: Jack Skelley

Posted: 1999-11-17 13:24:24   Link

Anders, Brad and Allister:

Thanks for the tips about using OLEDrop.

I was able to get the combobox to supply the textboxes with the data.

How can you have the data dropped in the textbox *homed* in the field?

I have tried to get the leading spaces off the displayed text in the textbox

with no luck.

What method would fire after a oledragdrop? I have tried all...

Thanks

Jack Skelley

skelley@newjerseydevils.com

Anders Altberg wrote:

> Jack

> Use the OLEDDrag&Drop methods and events instead.

> There are some good examples in the FFC, for instance in the Mover classes.

> -Anders

>

> ----- Original Message -----

> From: Jack Skelley <skelley@newjerseydevils.com>

> To: Multiple recipients of ProFox <profox@leafe.com>

> Sent: onsdag den 17 november 1999 01:20

> Subject: VFP6: Drag and Drop Methods

>

> | Good Evening All:

> | I would like to populate some text boxes on a form by selecting an item

> | from a combobox and drop it on the text box.

> | In the click event of the combobox I issue:

> | gcDrop_value = gaCountry(thisform.combo1.listindex,1) &&select the

> country

> |

> | thisform.combo1.drag(1) &&initiate the drag

> | In the dragicon event I set the mouse pointer to a pen.

> |

> | In the dragover event of the textbox I have the following:

> | thisform.combobox1.drag(2) &&drop the control

> | thisform.text2.value = gcDrop_value

> | thisform.refresh()

> | This seems to work but doesn't work like a true drag and drop. The mouse

> | doesn't need to be held down for the icon to change to a pen. And I don't

> | need to release the mouse in the textbox but as soon as the pen enters the

> | textbox the value appears in the textbox.

> | How do you create a *true* drag and drop? I have tried most combinations

> | and can't make it work the way I want.

> | Thanks for your help.

> |

> | Jack Skelley

> | skelley@newjerseydevils.com

> |

> |

> |

>

©1999 Jack Skelley
Back to top
RE: VFP6: Drag and Drop Methods

Author: Brad Jones

Posted: 1999-11-17 14:52:19   Link

In your textbox.OLEDragDrop event...

----------

NODEFAULT

IF oDataObject.GetFormat(1)

THIS.Value = oDataObject.GetData(1)

ENDIF

----------

Look up 'DataObject' in your VFP help for a better understanding of your

options.

--Brad

> -----Original Message-----

> From: profox@leafe.com [mailto:profox@leafe.com]On Behalf Of Jack

> Skelley

> Sent: Wednesday, November 17, 1999 1:24 PM

> To: Multiple recipients of ProFox

> Subject: Re: VFP6: Drag and Drop Methods

>

>

> Anders, Brad and Allister:

> Thanks for the tips about using OLEDrop.

> I was able to get the combobox to supply the textboxes with the data.

> How can you have the data dropped in the textbox *homed* in the field?

> I have tried to get the leading spaces off the displayed text in

> the textbox

> with no luck.

> What method would fire after a oledragdrop? I have tried all...

> Thanks

>

> Jack Skelley

> skelley@newjerseydevils.com

>

>

> Anders Altberg wrote:

>

> > Jack

> > Use the OLEDDrag&Drop methods and events instead.

> > There are some good examples in the FFC, for instance in the

> Mover classes.

> > -Anders

> >

> > ----- Original Message -----

> > From: Jack Skelley <skelley@newjerseydevils.com>

> > To: Multiple recipients of ProFox <profox@leafe.com>

> > Sent: onsdag den 17 november 1999 01:20

> > Subject: VFP6: Drag and Drop Methods

> >

> > | Good Evening All:

> > | I would like to populate some text boxes on a form by

> selecting an item

> > | from a combobox and drop it on the text box.

> > | In the click event of the combobox I issue:

> > | gcDrop_value = gaCountry(thisform.combo1.listindex,1) &&select the

> > country

> > |

> > | thisform.combo1.drag(1) &&initiate the drag

> > | In the dragicon event I set the mouse pointer to a pen.

> > |

> > | In the dragover event of the textbox I have the following:

> > | thisform.combobox1.drag(2) &&drop the control

> > | thisform.text2.value = gcDrop_value

> > | thisform.refresh()

> > | This seems to work but doesn't work like a true drag and

> drop. The mouse

> > | doesn't need to be held down for the icon to change to a pen.

> And I don't

> > | need to release the mouse in the textbox but as soon as the

> pen enters the

> > | textbox the value appears in the textbox.

> > | How do you create a *true* drag and drop? I have tried most

> combinations

> > | and can't make it work the way I want.

> > | Thanks for your help.

> > |

> > | Jack Skelley

> > | skelley@newjerseydevils.com

©1999 Brad Jones
Back to top
Re: VFP6: Drag and Drop Methods

Author: Jack Skelley

Posted: 1999-11-17 15:21:47   Link

Brad:

Thanks! Works like a dream (as opposed to a nightmare <g>).

Now the control works as I had hoped it would.

I read the sections in the "VFP6 Language Reference" and it didn't make much

sense until now. VFP6 is very new to me (like 4 months) so I appreciate the

help. Thanks again!

Jack Skelley

Director of Programming and Computer Operations

New Jersey Devils Hockey Club

skelley@newjerseydevils.com

Brad Jones wrote:

> In your textbox.OLEDragDrop event...

>

> ----------

> NODEFAULT

>

> IF oDataObject.GetFormat(1)

> THIS.Value = oDataObject.GetData(1)

> ENDIF

> ----------

>

> Look up 'DataObject' in your VFP help for a better understanding of your

> options.

>

> --Brad

>

> > -----Original Message-----

> > From: profox@leafe.com [mailto:profox@leafe.com]On Behalf Of Jack

> > Skelley

> > Sent: Wednesday, November 17, 1999 1:24 PM

> > To: Multiple recipients of ProFox

> > Subject: Re: VFP6: Drag and Drop Methods

> >

> >

> > Anders, Brad and Allister:

> > Thanks for the tips about using OLEDrop.

> > I was able to get the combobox to supply the textboxes with the data.

> > How can you have the data dropped in the textbox *homed* in the field?

> > I have tried to get the leading spaces off the displayed text in

> > the textbox

> > with no luck.

> > What method would fire after a oledragdrop? I have tried all...

> > Thanks

> >

> > Jack Skelley

> > skelley@newjerseydevils.com

> >

> >

> > Anders Altberg wrote:

> >

> > > Jack

> > > Use the OLEDDrag&Drop methods and events instead.

> > > There are some good examples in the FFC, for instance in the

> > Mover classes.

> > > -Anders

> > >

> > > ----- Original Message -----

> > > From: Jack Skelley <skelley@newjerseydevils.com>

> > > To: Multiple recipients of ProFox <profox@leafe.com>

> > > Sent: onsdag den 17 november 1999 01:20

> > > Subject: VFP6: Drag and Drop Methods

> > >

> > > | Good Evening All:

> > > | I would like to populate some text boxes on a form by

> > selecting an item

> > > | from a combobox and drop it on the text box.

> > > | In the click event of the combobox I issue:

> > > | gcDrop_value = gaCountry(thisform.combo1.listindex,1) &&select the

> > > country

> > > |

> > > | thisform.combo1.drag(1) &&initiate the drag

> > > | In the dragicon event I set the mouse pointer to a pen.

> > > |

> > > | In the dragover event of the textbox I have the following:

> > > | thisform.combobox1.drag(2) &&drop the control

> > > | thisform.text2.value = gcDrop_value

> > > | thisform.refresh()

> > > | This seems to work but doesn't work like a true drag and

> > drop. The mouse

> > > | doesn't need to be held down for the icon to change to a pen.

> > And I don't

> > > | need to release the mouse in the textbox but as soon as the

> > pen enters the

> > > | textbox the value appears in the textbox.

> > > | How do you create a *true* drag and drop? I have tried most

> > combinations

> > > | and can't make it work the way I want.

> > > | Thanks for your help.

> > > |

> > > | Jack Skelley

> > > | skelley@newjerseydevils.com

>

©1999 Jack Skelley