Solved

TMemo text color (syntax highlighting)

Posted on 1999-01-15
3
339 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
[X]
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
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

734 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