07-13-2009 01:40 PM
Hello!
I want to use the Rich Text Box in my Chat-Project and need some help.
Following questions:
1. do I need to understand how RTF format works? I mean I want only transmit data from one RTB (Rich Text Box) to an other RTB over TCP/IP
2. how to make RTB compatible with unicode? Is it possible to copy every formatted content from the clipboard like in MS Word?
3. how to append a message to an other message in RTF format? Should I really parse the RTF-content for tags to put it?
4. can I put every picture in every format (should be smilies later) or I only need bitmaps? I want it supports PNG with transparency, is it possible?
Thank You, with Regards, Eugen
07-14-2009 05:24 AM
07-14-2009 06:22 AM
Hi Eugen,
i think you don't need to understand the format to write text into the Rich Text Box or to read from it. It's possible with a property node.
Mike
07-14-2009 06:31 AM
Hello Mike! Thank you for reply. I know there is a method for Appending a Text, but how is it if it's not only a text, but a text with pictures?
What is about other questions? Any idea?
Regards, Eugen
07-14-2009 09:03 AM
Here is the spec from Micorsoft:
You may also find this of some use:
It is not a simple procedure. You may find it easier if you are just doing some basic things to just open up Wordpad, create the document, then look at the document in Notepad. RTF is just a text document which tells a renderer what to do, similar to HTML.
One thing to note is that not all RTF viewers are created equal. For example, WordPad doesn't support the page break tag, whereas Word and Word Viewer do. I have seen tables interpreted very differently as well. I played with the RTF Box a bit, and it has limited support.
You will need to understand the format. I believe it has a beginning and end tag for the document, so you will need to reparse everything.
I had to use RTF for a report, and I basically built it in Word, opened it in WordPad and resaved (Word's RTF is really ugly). Got the basics of the report and determined the tags where the data went and basically wrote VIS to build the file. I added in the unsupported tags so Word Viewer would be able to do the page break, and a couple of other things.
07-14-2009 10:32 AM
Ok, thank you.
I tried to make a little test programm, which copies from one RTF to an other. The first problem have is:
if I copy russian text from clipboard, than it will be shown right in both RTBs, but if I type this from keyboard, than I see anything wrong.
Any ideas?
Thanks, Eugen
07-26-2010 06:47 AM
Hi Eugen,
I saw your post and it looks very interesting. Are you still working on this issue?
TomBaum