I have a listbox on a window. The user selects a name and the change event puts a code on the clipboard that will pasted into a different program. This works. But I would like the user to be able to select the name, hit return or click a button to quit the app and then go back to the other app to paste. Quitting the app erases the clipboard. Thisis not essential, but convenient.
If I select the name, paste the code and then close the app, I can continue pasting the code, it is not erased after it has been pasted one time.
So, is there any way to “paste” in code so that theclipboard won’t be erased?
Also I have noticed that many, but not all, Linux apps have this same erasing “feature”. So I am guessing that there is some way around it.
I am putting the text on the clipboard with:
Dim cb as new clipboard
cb.text = “thecode”
I also tried putting it on the clipboard with xclip:
Dim sh as new shell
sh.execute echo -n “the code” | xclip -selection clipboard
This causes the app to hang until the code is pasted into the other program, which would work except that the user couldn’t change his mind and select another name.
Xojo 2016r4.1, Mint 18.3, MATE.