Archived

This topic is now archived and is closed to further replies.

Lord Hen

Rich edit control

Recommended Posts

Someone else posted a question about rich edit controls, and I remembered something I couldnt figure out a few days ago. Im actually using VB, but the nature of the problem should make it language independant. I dont have rich text in the clipboard, but I need to append some to another rich text control. The actual rtf code is being sent over a network, being sent to another program, which needs to add the rtf code to its box. But when I do this, the new text just doesnt show up. Anyone know whats wrong? Thanks, Lord Hen "I am free of all prejudices. I hate everyone equally." - W. C. Fields [edited by - Lord Hen on December 2, 2008 2:32:49 AM] [edited by - Lord Hen on May 26, 2004 6:17:23 PM]

Share this post


Link to post
Share on other sites
Do you call an update for your control?
Otherwise I have no idea at all.
Good luck,

- Patrik Willbo

The Lord says He can get me out of this mess, but He''s pretty sure you''re fucked.
- Stephen (Braveheart)

Share this post


Link to post
Share on other sites
There is no update function for it.
To set the text in the control, you do RTF1.TextRTF = "(rtf code here)"


So, I just made a rich text control with some blue text...this is the rtf code for it:

"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\cf1\f0\fs17 hello, this is a test\cf0
\par }"

So, I need to send some of that over a network connection, and the other program has to append it to another rich text box that already has some of that code:

RTF1.TextRTF = RTF1.TextRTF & newrtftext

"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\cf1\f0\fs17 hello, this is a test\cf0
\par }
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\cf1\f0\fs17 hello, this is a test\cf0
\par }"

That doesnt work, and I dont really know what I should do to append new rtf text to it.


Can anyone help me out?

Thanks,
Lord Hen

Share this post


Link to post
Share on other sites
Does anyone have an idea of what I should do?

I am considering breaking apart the rtf code, sending information about the text along with it, and rebuilding the entire rtf box when its recieved, but this just doesnt seem right.

Thanks,
Lord Hen

Share this post


Link to post
Share on other sites