[Gambas-user] Copy data like Ctrl-C
Fabien Bodard
gambas.fr at ...626...
Wed Mar 9 17:27:19 CET 2016
You can do :
Clipboard.Current = ClipBoard.Selection
Clipboard.Copy(txtData.Text)
And then the Data will be availbale in the secondary clipboard too...
AKA the middle mouse button paste datas
2016-03-09 17:07 GMT+01:00 Rolf-Werner Eilert <eilert-sprachen at ...221...>:
>
> 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
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fabien Bodard
More information about the User
mailing list