1 (edited by Destiny 2022-04-05 16:30:23)

Topic: copy button

How to create button to copy text from TextBox to paste text in Notepad

Destiny

Re: copy button

Hello Destiny

Un début de piste :
A start of the clue :

procedure TEditForm.CutToClipboard(Sender: TObject);
begin
   Editor.CutToClipboard;
end;
procedure TEditForm.CopyToClipboard(Sender: TObject);
begin
   Editor.CopyToClipboard;
end;
procedure TEditForm.PasteFromClipboard(Sender: TObject);
begin
   Editor.PasteFromClipboard;
end;

JB

Re: copy button

Merci Jean, je vais essayer demain. Bonne soirée

Thanks John, I'll try tomorrow. Have a good evening

Destiny

4 (edited by Destiny 2022-04-06 06:49:27)

Re: copy button

Hello, here is the image that represents the text to be copied, the copy does not work with Notepad.
I would like to be able to copy "This is an essay" by clicking the button.

Bonjour, voici l'image qui représente le texte à copier, la copie ne fonctionne pas avec Notepad.
Je voudrais pouvoir copier "Ceci est un essai" en cliquant sur le bouton.

Post's attachments

Attachment icon es.jpg 4.5 kb, 63 downloads since 2022-04-06 

Destiny

Re: copy button

Have you tried ClipboardSet?

Post's attachments

Attachment icon Clipboard.zip 547.42 kb, 152 downloads since 2022-04-06 

brian

Re: copy button

Great, that's exactly what I was looking for.
Thank you

Destiny

Re: copy button

Hello All,
Maybe this could also be of interest to you Destiny - I use it when I'm doing a lot of copy/paste within MVD with forms that have a lot of edit fields (but it works just the same if you are copying to an external document).
Derek.

Post's attachments

Attachment icon clippy.zip 335.25 kb, 159 downloads since 2022-04-06 

Re: copy button

It's another approach and works well, I keep the one from brian.zaballa which has a button and that's what I was looking for.
Thanks Derek.

Destiny