Solved

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

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi Form ownership 4 107
Print Graphic and Text to Epson TM-T88v 12 367
How to debug For loops? 3 56
FMX and jaudiotracker playing memory stream 29 85
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 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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

790 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