Lazarus

Programming => Operating Systems => Android => Topic started by: wywong on April 08, 2020, 02:56:44 am

Title: [Solved] LAMW - how to access the clipboard?
Post by: wywong on April 08, 2020, 02:56:44 am
I try to copy some text to the Android clipboard using the Windows way:

uses ClipBrd,...

ClipBoard.setTextbuf('Hello');

or
 
ClipBoard.asText := 'Hello';

Both build OK but both crash my app when testing on my smartphone. Is clipboard implemented? If so, how to use it?
Title: Re: LAMW - how to access the clipboard?
Post by: jmpessoa on April 09, 2020, 03:05:14 am

Some LAMW components has "build-in"  clipboard methods....
Title: Re: LAMW - how to access the clipboard?
Post by: wywong on April 09, 2020, 02:03:50 pm
Thanks jmpessoa. I tried the following code and it worked!

jTextView1.text := 'Hello'; jTextView1.copyToClipboard();
TinyPortal © 2005-2018