Index
1999-12-10 13:54 – Jack Skelley : VFP6: Drag and Drop of a text box
1999-12-10 14:21 – dtutuc@danube.hu: Re: VFP6: Drag and Drop of a text box
1999-12-10 14:21 – Abergquis@cs.com: Re: VFP6: Drag and Drop of a text box
1999-12-10 14:21 – Ed Leafe : Re: VFP6: Drag and Drop of a text box
1999-12-10 14:56 – Jack Skelley : Re: VFP6: Drag and Drop of a text box
Back to top
VFP6: Drag and Drop of a text box

Author: Jack Skelley

Posted: 1999-12-10 13:54:40   Link

Good Afternoon All:

I guess after manipulating (fooling with <g>) a text box to text box

drag and drop I have concluded that the text box must have select on

entry set to true before a drag operation can start.

So that requires 2 mouse clicks. 1 to set focus to the current text box

(with select on entry set to .t.) and a second click (and hold) to begin

the drag operation.

How can this be done with only one mouse click on the textbox? So that

the text is selected then with a long enough hold the drag operation can

start.

I have tried mouse down to Ctrl + A the text box but it doesn't seem to

be reliable. The selected text isn't always what gets dropped the

receiving text box.

Thanks for the help.

Jack Skelley

skelley@newjerseydevils.com

©1999 Jack Skelley
Back to top
Re: VFP6: Drag and Drop of a text box

Author: dtutuc@danube.hu

Posted: 1999-12-10 14:21:01   Link

Try this:

in your textbox1' MouseDownEvent put this code

LPARAMETERS nButton, nShift, nXCoord, nYCoord

if nButton=3D1

this.selstart=3D0

this.sellength=3Dlen(this.value)+1

this.drag(1)

endif

It worked for me

HTH

___________________

Daniel Tutuc

System Administrator

Danube Knitwear Ltd

Email: =A0 dtutuc@danube.hu

=

©1999 dtutuc@danube.hu
Back to top
Re: VFP6: Drag and Drop of a text box

Author: Abergquis@cs.com

Posted: 1999-12-10 14:21:06   Link

Hi Jack,

Would the following help:

with This

.SelStart = 0 && or .SelStart = 1

.SelLength = Len(Alltrim(Evaluate(.ControlSource)))

endwith

in the MouseDown() event/method?

Art Bergquist

abergquis@cs.com

In a message dated 12/10/1999 10:59:35 AM Pacific Standard Time,

Skelley@NewJerseyDevils.com writes:

> Good Afternoon All:

> I guess after manipulating (fooling with <g>) a text box to text box

> drag and drop I have concluded that the text box must have select on

> entry set to true before a drag operation can start.

> So that requires 2 mouse clicks. 1 to set focus to the current text box

> (with select on entry set to .t.) and a second click (and hold) to begin

> the drag operation.

> How can this be done with only one mouse click on the textbox? So that

> the text is selected then with a long enough hold the drag operation can

> start.

> I have tried mouse down to Ctrl + A the text box but it doesn't seem to

> be reliable. The selected text isn't always what gets dropped the

> receiving text box.

> Thanks for the help.

>

> Jack Skelley

> skelley@newjerseydevils.com

>

©1999 Abergquis@cs.com
Back to top
Re: VFP6: Drag and Drop of a text box

Author: Ed Leafe

Posted: 1999-12-10 14:21:59   Link

On 12/10/1999 1:54 PM, Jack Skelley supposedly said:

>I guess after manipulating (fooling with <g>) a text box to text box

>drag and drop I have concluded that the text box must have select on

>entry set to true before a drag operation can start.

>So that requires 2 mouse clicks. 1 to set focus to the current text box

>(with select on entry set to .t.) and a second click (and hold) to begin

>the drag operation.

>How can this be done with only one mouse click on the textbox? So that

>the text is selected then with a long enough hold the drag operation can

>start.

>I have tried mouse down to Ctrl + A the text box but it doesn't seem to

>be reliable. The selected text isn't always what gets dropped the

>receiving text box.

In the MouseDown() event, place

This.Drag(1)

to initiate dragging. The drawback, of course, is that the user can no

longer use the mouse to select text within the textbox, as this will

cause the box to be dragged instead.

___/

/

__/

/

____/

Ed Leafe

http://leafe.com/

©1999 Ed Leafe
Back to top
Re: VFP6: Drag and Drop of a text box

Author: Jack Skelley

Posted: 1999-12-10 14:56:10   Link

Ed, Daniel, Art:

Thanks for the help.

I (guess) I was on the right track but omitted the selstart = 0.

When I included that line it worked just the way I had hoped it would.

Thanks again.

Jack

skelley@newjerseydevils.com

dtutuc@danube.hu wrote:

> Try this:

>

> in your textbox1' MouseDownEvent put this code

>

> LPARAMETERS nButton, nShift, nXCoord, nYCoord

> if nButton=1

> this.selstart=0

> this.sellength=len(this.value)+1

> this.drag(1)

> endif

>

> It worked for me

>

> HTH

>

> ___________________

> Daniel Tutuc

> System Administrator

> Danube Knitwear Ltd

> Email: dtutuc@danube.hu

>

> ----------------------------------------

> To unsubscribe, send a message to: macjordomo@leafe.com, and include the line

> UNSUBSCRIBE profox

> in the message body. Or go to http://leafe.com/mailListMaint.html and follow

> the instructions there.

> ----------------------------------------

>

©1999 Jack Skelley