Solved

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

Posted on 2004-08-20
4
166 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
  • 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now