LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Understanding Rich Text

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

0 Kudos
Message 1 of 7
(6,120 Views)

Nobody can help me?

 

Thanks, Eugen

0 Kudos
Message 2 of 7
(6,082 Views)

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

0 Kudos
Message 3 of 7
(6,072 Views)

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

0 Kudos
Message 4 of 7
(6,069 Views)

Here is the spec from Micorsoft:

 

http://www.microsoft.com/downloads/details.aspx?FamilyId=DD422B8D-FF06-4207-B476-6B5396A18A2B&displa...

 

You may also find this of some use:

 

http://interglacial.com/rtf/

 

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.

Message 5 of 7
(6,058 Views)

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

 

RichText.png

0 Kudos
Message 6 of 7
(6,045 Views)

Hi Eugen,

 

I saw your post and it looks very interesting. Are you still working on this issue?

 

TomBaum

0 Kudos
Message 7 of 7
(5,836 Views)