On Friday, 30 July 2021 at 20:01:09 UTC, rikki cattermole wrote:
On 31/07/2021 7:33 AM, tastyminerals wrote:
I made a GUI app using tkd library. I am reading the string
from one of the app widgets and would like to put it into the
clipboard. Does anyone have an idea how to copy a string to
the clipboard in D?
copyText on a Text widget appears to do what you want.
https://github.com/nomad-software/tkd/blob/9ca40d117649bb9a9db108d8f92e92870b9dc77e/source/tkd/widget/text.d#L477
https://wiki.tcl-lang.org/page/tk_textCopy
The problem is that I don't use Text widget but retrieve the
string from TreeView widget which only has getSelectedRows
method. So I thought there may be a way in D to communicate with
the system clipboard...