Solved

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

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Comparing dates in Delphi. Greater than/ Less than 3 151
URL for downloading Google Chrome for Win XP 2 152
How to debug For loops? 3 49
Base1 Encode/Decode 3 77
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…
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…
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 …
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…

776 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