Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
System restore point 4 91
Magic Software info 18 125
Tviruailstringtree sort multi columns on header click 1 54
Graphics32 under Delphi 10.1 Berlin 2 38
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

867 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

12 Experts available now in Live!

Get 1:1 Help Now