Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vfp 7.0 edit & paste into a memo field 2

Status
Not open for further replies.

bettyfurr

Technical User
Mar 12, 2002
371
0
0
US
The users don't seem to want to do the ctrl+c to copy and ctrl+v to paste into a memo field. they want to highlight text from another field and click a button.

Can this be done? I can not find anything on this except in fox editior. This memo field is on a page form, and they want to highlight and click and put the text into a nother form, move the data around, etc.

One of you guys have got to know how to do this.
 
Hi Betty,

1. Create a form property.. cCopyText

2. In the textBox where the selection is made.. in its LostFocus Event.. put the code..

ThisForm.cCopyText = This.SelText

SO if they select any text in the text box, it goes to the cCopyText property.

3. In the GotFocus event of the memo box..

IF ! EMPTY(ThisForm.cCopyText)
KEYBOARD ThisForm.cCopyText
ThisForm.cCopyText=""
ENDIF

The only point is that after selection they have to locate at the right place in the MemoBox.

:) ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com

 
Ramani,

I have a problem, they have to be able to dump this to the windows clipboard. they could be going into a word document that has the text they want to add; copy using the edit copy, or another page form that has similar text in another project and there is no copy function.

see my problem.
 
Use the _CLIPTEXT system variable in Foxpro:

_CLIPTEXT = cExpressionParameters

cExpression
Specifies the character expression to store in the Clipboard.

Remarks
You can place a character expression cExpression on the Clipboard with STORE or the = assignment operator.

Cheers; Chet Gardiner
 
Hi Betty

In the lost focus of the box you want to copy..
_clipText = This.SelText

But if you want to get from some other word or excel.. then VFP has no easy control over them. Those progra has to send it to _clipboard..

ANyway.. if this helps you..
_clipText is the ClipBoards contenets. You can copy to ClipBoard with..
_clipText = myText

You can copy back from _clipBoard with..
KEYBOARD _clipText

:) ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top