Solved

TMemo text color (syntax highlighting)

Posted on 1999-01-15
3
326 Views
Last Modified: 2013-12-03
how do I highlight certain text with a TMemo component ? an example would be syntax highlighting within an editor. I would like to highlight multiple parts of the text, in different colors.
0
Comment
Question by:graham_k
3 Comments
 
LVL 10

Expert Comment

by:Lischke
ID: 1418818
Hi Graham,

TMemo isn't designed to be used with different colors and fonts. What you'd need is a rich edit control, where you select a part of the text and then assign your font properties to TRichEdit.SelAttributes (inluding text color).

Ciao, Mike
0
 
LVL 7

Accepted Solution

by:
BlackMan earned 100 total points
ID: 1418819
There is a free edit component (like TMemo) with syntax highlightning here: http://www.eccentrica.org/gabr/mw/mwedit.htm
0
 
LVL 6

Author Comment

by:graham_k
ID: 1418820
Thanks, I'll D/L it & check it out. If for some reason I can't use it, I guess that I'll have to cehck out TRichEdit
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video discusses moving either the default database or any database to a new volume.

708 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

13 Experts available now in Live!

Get 1:1 Help Now