Solved

Rich text format of first letter in record sets format of all other records.

Posted on 2004-08-20
4
170 Views
Last Modified: 2010-04-05
Hi expert,

For those of you who read what I wrote before, sorry to have deleted it. Much of what I put into the description of the problem turns out to be irrelevant to it. So let me rephrase completely.

I have turned a Memo control (ansistring) into a RichEdit. Plain text (record) is shown and can be edited so that it becomes rich text. Memo's are shown in a treeview, so clicking the memo in the treeview shows its content in a window next to it.

Now: the problem. Nothing is wrong when text is 'enriched' as long as the first letter is left alone. That is to say: if the first letter remains unedited, scrolling through the memo's shows no changes except for those in that one memo. If some part of the text was set to bold, it stays bold just where it was supposed to. However. If the first character is edited, say set to bold, then all other memo's immediately turn bold, as if the style for the whole application was supposed to be changed.

Previously I assumed this was related to stringstreams but it turns out not to be the case. Sorry for that.

I have used code that came with Delphi Studio 7, the RichEdit Demo, and put this into my own application that showed, as described, just plain text memo's in a treeview.

Any suggestions?

Thanks,

Ron dW
0
Comment
Question by:Ron_de_Weijze
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 

Author Comment

by:Ron_de_Weijze
ID: 11876852
Changed description and increased point value.

Ron dW
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 300 total points
ID: 11878239
try following, before you show new record

  richedit1.lines.clear;
  richedit1.selattributes := richedit1.DefAttributes;
  //display now your record

hope thats it

meikl ;-)
0
 

Author Comment

by:Ron_de_Weijze
ID: 11879426
Meikl,

At the foot of Everest I cannot see you but I will send up some smoking signals that you are a sage indeed.

Thanks,

Ron dW
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 11879454
glad that this helps you :-))

thanks for the smoking signals ;-)

meikl ;-)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question