Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

TMemo text color (syntax highlighting)

Posted on 1999-01-15
3
Medium Priority
?
346 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 300 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
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…
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

722 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