views:

261

answers:

2

Hi SO.

I am looking for a graphical component in Delphi winch have such features:

  • allows to paint text in different font types, sizes and colors
  • allows to select previously drawn text and copy it
  • paints images on a given coords, gif support would be nice
  • its very fast in terms of CPU usage

I need this component as a main chat window. I don't want to use it as a text editor.

I've tried two solutions so far:

  • TVirtualStringTree
  • THtml

Currently I am using THtml. It performs quite nice but it is a bit to slow due to two facts:

  • It supports many features which are not necessary in my case
  • Each time I want to add some content to it, I must reload the whole content

I really don't want to go into its sources and modify them until I have no other choice. So maybe someone of you knows some nice lightweight component which I can use instead?

+1  A: 

What about a TRichEdit? Most of the things you mention should be easiliby possible with this component.

Concering the insertion of a bitmap, see this article on Delphi 3000.

Smasher
Thanks for the answer @Smasher. I've tried with adding bitmap and it works. However I don't feel that TRichEdit is exactly what I want. It has this blinking cursor (since its a text editor) and allows me to add only a bitmap. Perhaps this two issues can be solved but it is not as straightforward as I would like to. But if noone else gives me a better clue I will mark it as answer.
Wodzu
I'm not sure you'll find something that fits your needs EXACTLY. Concerning the cursor: http://delphi.about.com/cs/adptips2003/a/bltip0703_5.htm. And GIF components are definitely available.
Smasher
Thanks, so how you would solve adding GIF to TRichEdit?
Wodzu
I've found that link: http://www.mombu.com/programming/html/t-how-to-add-gif-picture-to-memo-or-richedit-in-bcb-801097.htmlbut as I said earlier. It is not straightforward....
Wodzu
You could use `TGIFImage` to convert it to a bitmap.
Smasher
BTW: I don'T want to talk you into using `TRichEdit`. I just think that the points you mention are solvable. If you find a better component - wonderful!
Smasher
It's ok Smasher, I just hope for some kind of advice. You see, when I convert GIF into bitmap I will lose probably a transparency and I will lose for sure an animation...
Wodzu
+1  A: 

Take a look at TRichView. It's derived from TCustomControl so no external dependencies. It's third party commercial component, but a very good one. Skype Win client uses it.

Mihaela
Thanks Mihaela. I was few times on this site and always tought that this is not for me... But maybe I was wrong, so I am give it a try.
Wodzu
Do try it. It's really very powerful. Once I used it as a reporting "engine". You can draw anything on TRichView, tables, images. But it is also a full blown rich editor , like mini Word.Good Luck
Mihaela