Solved

Colouring Text

Posted on 1998-03-18
4
212 Views
Last Modified: 2010-04-06
Hi,
    I'm writing an editing program, and need to insert some statements into the memo in colour. The thing is, I want the file to be saved as a simple text file and just to have the colour appearing at run time. Is this possible?
Cheers
0
Comment
Question by:PiersBull
  • 2
4 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1360596
Hi PiersBull,

What about this? Display the text in a TRichEdit. If you want to save it, save it as a TMemo?

Regards, Zif.
0
 

Author Comment

by:PiersBull
ID: 1360597
Tom,
    Hi, it's me again. (Mr. LaTeX!, under a different user name). Does a TRichEdit give the same functionality as a TMemo? Will it give me any hassle with the program as it is?
Cheers, Nik
 
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1360598
Hi Mr. LaTex!

To tell you the truth, I never use a TRichEdit, for what I now is that they are the same, except in TRichEdit you can give the characters some other look. I mean, some bold, soem italic, some coloured...
But maybe you can find out more in the properties of these two.
Regards,Tom.
0
 

Accepted Solution

by:
wy2lam earned 10 total points
ID: 1360599
You can use TRichEdit to save as plain text of couse, since it "inherits" everything from TMemo (if you want to know why I quoted "inherits", take a look at the help file :-)

However, they are not the same.  First of all, all your users must have the correct version of richedit32.dll (with possible typo, but there should be a file similar with this name) in order to use your RichEdit-enabled application.  Plus, your app will take more resource than if you just use TMemo.

However, Richedit primarily have the advantages of
1. unlimited text length and
2. customizable font

So a solution is to use 3rd-party controls, derive your own, call API to change text attributes with TMemo, or just use a TControlCanvas.

Happy Experimenting !  Michael
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Copy file in dll not working but working on exe ! 18 93
Delphi : could not find program, '...exe' 2 171
HTML text in the body of an email (delphi code) 12 118
Delphi Yen format 3 35
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…
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…

778 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