Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-07

Clipboard tutorial.

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Torsten Bonde Christiansen

Hi all.

I've been spending som time now, looking for documentation on how to utilize the clipboard, but so far I have had no luck.

Does anyone know of a page that has a short introduction/tutorial, preferably something that will work cross-platform wise.

Kind regards,
Torsten Bonde Christiansen.

Reply by email

Graeme Geldenhuys
to Torsten Bonde Christiansen
Torsten Bonde Christiansen wrote
Does anyone know of a page that has a short introduction/tutorial, preferably something that will work cross-platform wise.

What GUI toolkit are you using and what platform? Or is it a console based application, which normally means the clipboard only functions inside your own application.

For example, the X11 (X-Window on unix type OSes) clipboard functions totally different to the Windows clipboard.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Torsten Bonde Christiansen
to Graeme Geldenhuys
Graeme Geldenhuys wrote 9 lines
Torsten Bonde Christiansen wrote: > > Does anyone know of a page that has a short introduction/tutorial, > preferably something that will work cross-platform wise. What GUI toolkit are you using and what platform? Or is it a console based application, which normally means the clipboard only functions inside your own application.

GUI application and preferably every possible combination.

I'm creating a cross-platform application that in some part of the program should be able to access the clipboard and read data as text only.

But from your answer if guess there is no single (simple) way to do this?

Regards,
Torsten.

Reply by email

Graeme Geldenhuys
to Torsten Bonde Christiansen
Torsten Bonde Christiansen wrote
But from your answer if guess there is no single (simple) way to do this?

No, various toolkits all handle the clipboard in different was. So you need to create an abstraction layer that wraps the various platforms you want to support into a common API - which your application will use. You can take a look at fpGUI Toolkit (url shown below) or MSEgui to see how it is done. Both these GUI toolkits support X11 and Windows clipboards.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Martin Friebe
to Torsten Bonde Christiansen: GUI application and preferably every possible combination. I'm creating a cross-platform…

If you use Lazarus (or at least the LCL) it has a unit Clipbrd

and you can do
    Clipboard.AsText:= FText;

Martin

Torsten Bonde Christiansen wrote 23 lines
Graeme Geldenhuys wrote: > Torsten Bonde Christiansen wrote: >> >> Does anyone know of a page that has a short introduction/tutorial, >> preferably something that will work cross-platform wise. > > > What GUI toolkit are you using and what platform? Or is it a console > based application, which normally means the clipboard only functions > inside your own application. GUI application and preferably every possible combination. I'm creating a cross-platform application that in some part of the program should be able to access the clipboard and read data as text only. But from your answer if guess there is no single (simple) way to do this? Regards, Torsten. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email