add a local file to clipboard

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

add a local file to clipboard

Postby HEKUCH » Wed Mar 22, 2017 3:42 pm

Hi guys,
In my application I manage documents. These are stored in a directory on the Servoy server. In my application, I show which documents are available for an operation. Now the user wants to do the following: The displayed documents should be dragged from the smartclient-application to another application (if possible by drag-drop). Of course I show in the smart client no documents, but only entries in the application.

Is there any ideas how I could make that?

Is there a way to copy a local file to the clipboard so that the file can be inserted again (eg in Outlook) with CTRL+V?
I have a solution which is not so elegant: I have created with Foxpro an EXE, which I can pass the files as parameters. This Foxpro application passes the files to the clipboard.
Hendrick Kurland

DataBit GmbH
CH-9217 Neukirch an der Thur
Posts: 13
Joined: Thu May 05, 2011 8:02 am

Re: add a local file to clipboard

Postby vschuurhof » Thu May 04, 2017 8:33 pm

Servoy offers basic functionality to handle clipboard content, like this:

Code: Select all

With this you could also get content of a file, but would not be very suitable other than some text within that file. Java offers functionality to copy a full file to the clipboard, but then you would have to investigate Java APIs which you can use directly inside Servoy code. Perhaps you can have a look at this page: ... rd-in-java

If you would have this working, then in Servoy you could use it together with the existing drag and drop functionality to make this work.
Vincent Schuurhof
Posts: 69
Joined: Tue Dec 14, 2010 12:00 pm

Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 3 guests