Recent

Author Topic: Copy To Clip Board with a TList?  (Read 5301 times)

captian jaster

  • Guest
Copy To Clip Board with a TList?
« on: July 23, 2010, 05:07:28 pm »
How can i copy to a clipboard using a TList?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Re: Copy To Clip Board with a TList?
« Reply #1 on: July 23, 2010, 05:18:41 pm »
Now while it's perfectly fine to use the forum, and spent a lot of time waiting for answers => there is a quicker, better way: google

And as I understand you are learning (maybe even teaching yourself) how to program, let me just say that programing is not just a few keywords in some language.

One of the points that makes a programmer is the ability to find information:

google: delphi clipboard

FreePascal/Lazarus are very similar, so very often you can use the results the same way.

First page I got was:
http://delphi.about.com/od/vclusing/a/tclipboard.htm

And if there is any diff in freepascal, it gives you enough keywords to search the lazarus source for examples.

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1930
Re: Copy To Clip Board with a TList?
« Reply #2 on: July 23, 2010, 05:28:08 pm »
First you have to serialize your data.
A TList is an array of pointers. It doesn't have a SaveToFile/Stream method, because it does not make a lot of sense to save pointers to File/Stream.
Once you have saved your data to a TStream, you can define your own clipboard format.
Then ask again ;-)

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Copy To Clip Board with a TList?
« Reply #3 on: July 23, 2010, 05:58:48 pm »
It makes no sense also to have pointers on clipboard. Why do you want them there?

Troodon

  • Sr. Member
  • ****
  • Posts: 484
Re: Copy To Clip Board with a TList?
« Reply #4 on: July 23, 2010, 06:33:43 pm »
Now while it's perfectly fine to use the forum, and spent a lot of time waiting for answers => there is a quicker, better way: google

I made a similar suggestion a few months ago but he just doesn't seem to care.
Lazarus/FPC on Linux

 

TinyPortal © 2005-2018