Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Colouring Text

Posted on 1998-03-18
4
213 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

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

808 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