Re: VFP6: Drag and Drop Methods

Author: Jack Skelley

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

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