[Gambas-user] Copy data like Ctrl-C

Rolf-Werner Eilert eilert-sprachen at ...221...
Wed Mar 9 17:07:16 CET 2016


Am 09.03.2016 17:01, schrieb ML:
> On 2016-03-09 12:42, Rolf-Werner Eilert wrote:
>> When I want to copy data for copy-and-paste like with Ctrl-C, how could
>> I do it directly from code (via press of a button) instead of offering a
>> text area for the mouse?
>>
>> In our database, sometimes I need a student's address in Writer or
>> another program. It would be nice to have a button to copy the relevant
>> fields automagically to be used in Writer by Ctrl-V.
>>
>> I haven't found any information about this because I don't know where to
>> look for.
>>
>> Thanks for your insight!
>>
>> Rolf
> For that you should use the Clipboard object:
>
>    Clipboard.Clear
>    Clipboard.Copy(txtData.Text)
>
> You can also .Paste() from the clipboard.
>
>

Aah - Gambas rocks!

Thank you

Rolf





More information about the User mailing list