Page 1 of 1

clipboard

Posted: Tue Apr 12, 2011 2:20 pm
by Silvio
How copy a field of a record on clipboard and show which string I have on clipboard ?

Re: clipboard

Posted: Tue Apr 12, 2011 2:23 pm
by mgsoft
See samples\testclip.prg

Re: clipboard

Posted: Tue Apr 12, 2011 2:39 pm
by Silvio
THANKS

Re: clipboard

Posted: Wed Apr 13, 2011 3:42 am
by hag
How do you get a ctrl c and ctrl v copy?

Re: clipboard

Posted: Wed Apr 13, 2011 2:34 pm
by James Bott
>How do you get a ctrl c and ctrl v copy?

They work for me.

Can you provide an small sample showing the problem?

James

Re: clipboard

Posted: Wed Apr 13, 2011 3:33 pm
by hag
mine drops the right number. 123456 pastes as 12345.

Re: clipboard

Posted: Wed Apr 13, 2011 3:35 pm
by Richard Chidiak
if you are using resources , add this to your resource

ES_AUTOHSCROLL

Hth

Richard

Re: clipboard

Posted: Thu Apr 14, 2011 2:28 am
by hag
Thanks I'll give it a try.

Re: clipboard

Posted: Thu Apr 14, 2011 7:46 am
by Silvio
it is simply

DEFINE CLIPBOARD oClp OF oApp():oDlg

MENU oMenu POPUP 2007
....

MENUITEM "Copia il codice utente in memoria";
RESOURCE "SM_CLIP1";
ACTION oClp:SetText( (cDBF)->CLUSUARIO )

MENUITEM "Copia la password in memoria" ;
RESOURCE "SM_CLIP2";
ACTION oClp:SetText( (cDBF)->CLCLAVE )

MENUITEM "Vedere la stringa in memoria" ;
RESOURCE "SM_CLIP3";
ACTION GetSomeText(oClp)

SEPARATOR

ENDMENU
ACTIVATE POPUP oMenu

Re: clipboard

Posted: Thu Apr 14, 2011 11:33 am
by James Bott
Harvey,

>mine drops the right number. 123456 pastes as 12345.

If your field length is 6 (for the above example) the problem may be an artifact caused by the way Clipper handles the cursor (which was carried over to (x)Harbour). The cursor will be after the 5 when the entire field is full, rather than after the 6 as one might expect.

Richard's suggestion may solve it.

James