Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What deterrmines where we can copy and paste?
Message
De
29/04/2004 15:13:27
 
 
À
29/04/2004 14:42:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00899387
Message ID:
00899483
Vues:
16
Tracy,
No, I don't think you are missing anything. It looks like you are handling (/reinventing) the copy and paste functionality with your own methods Grabit() or Grabthis() and Pastethis() in your base classes. I think that if you want to use the "built-in" cut,copy &paste functions you would need to have an active edit menu (whether visible or not) with Cut = BAR# _med_cut, Copy = BAR# _med_copy, Paste = BAR# _med_paste. At least that is how I have always implemented it.



>Am I missing something? I have the below code in the rightclick method of a listbox:
>
>
>DEFINE POPUP shortcut SHORTCUT RELATIVE FROM MROW(),MCOL()
>		DEFINE BAR 1 OF shortcut PROMPT "COPY"
>		ON SELECTION BAR 1 of shortcut _Screen.Activeform.GRABIT()
>		ACTIVATE POPUP shortcut
>
>and the form's grabit method contains:
>
>PRIVATE nCnt
>nCnt = THIS.lstSource.ListIndex
>_cliptext = ALLTRIM(THIS.lstSource.LIST(ncnt))
>RETURN
>
>I use it to copy a value to the clipboard and then I jump to Adobe Acrobat and past the value into a field property. It works and I do not have the edit menu enabled or visible at all.
>
>I do the same thing with textboxes':
>
>DEFINE POPUP shortcut SHORTCUT RELATIVE FROM MROW(),MCOL()
>		DEFINE BAR 1 OF shortcut PROMPT "COPY"
>		DEFINE BAR 2 OF shortcut PROMPT "PASTE"
>		ON SELECTION BAR 1 of shortcut _Screen.ActiveForm.grabthis('oacordict.txtformfield')
>		ON SELECTION BAR 2 OF shortcut _Screen.ActiveForm.pastethis('oacordict.txtformfield')
>		ACTIVATE POPUP shortcut
>RETURN
>
>
>
>
>>I'm not sure, but I think that you have to have an edit menu enabled that contains the cut,copy, and paste options. If your menu has these options but is disabled, or you have no menu at all, copy and paste will not work. Check out Message #886627 or Message #892096 to see if these will offer a solution.
>>
>>HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform