Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

Make a copy/paste

Post Reply
Mili
Posts: 1
Joined: Thu May 30, 2024 10:01 pm

Make a copy/paste

Post by Mili »

Hello,

I have a text in a TMemo. I want to copy this text to "ChromiumWindow1". i.e., “copy” from “Memo1” and “paste” into “ChromiumWindow1”.
How to do it please?

thank you
User avatar
salvadordf
Posts: 4620
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Make a copy/paste

Post by salvadordf »

Hi,

Use the SimpleBrowser2 demo as a template for your application and use JavaScript with the TChromiumCore.ExecuteJavaScript procedure :
https://stackoverflow.com/questions/7609130/set-the-default-value-of-an-input-field

Search ExecuteJavaScript in all the demos to see many examples using that procedure.
sodlf159
Posts: 90
Joined: Thu Nov 09, 2023 1:55 pm

Re: Make a copy/paste

Post by sodlf159 »

Data := Clipboard;
Data.AsText := B; //keyword
Form1.Chromium1.ClipboardPaste;
Post Reply