>>Hi Guys
>>Any good ideas on how to copy from one editbox and paste into another.
>>Thanx-a-ton - John
>
>You can include the standard VFP Edit-Copy and Edit-Paste options on your menu, then you'll be able to copy/paste directly.
>OR
>If you want to program your own copy/paste, then look at the SelStart, SelLength and Seltext properties of the EditBox control.
>
>e.g. to copy selected text from editbox1 to editbox2
>
>IF THISFORM.edtBox1.SelLength > 0 &&don't really need this
>THISFORM.edtBox2.SelText = THISFORM.edtBox1.SelText
>ENDIF
If the menu option isn't suitable, I've simulated CTRL-C & V using ON KEY LABEL,
copying SelText for the control to the clipboard. e.g.
ON KEY LABEL CTRL+C CopyText()
ON KEY LABEL CTRL+V PasteText()
PROC CopyText
_CLIPTEXT = _SCREEN.ActiveForm.ActiveControl.SelText
ENDPROC
PROC PasteText
_SCREEN.ActiveForm.ActiveControl.SelText = _CLIPTEXT
ENDPROC
Note : it is wise to check that current active control does have SelText property.
Mike
"I can live with doubt and uncertainty and not knowing. I think it is much more interesting to live not knowing than to have answers that might be wrong." - Richard Feynman