How to change particular font color in TMemo

Posted on 2009-02-17
Last Modified: 2013-11-23
How to change particular font color in Tmemo

i have below text in memo

It is important that...

i want to change the color of "important" to green.
is it possible?
Question by:tankergoblin
    LVL 14

    Expert Comment

    TMemo will not work for that. It's all one font.
    You will need to use a TRichEdit In order to have varying fonts.
    LVL 14

    Expert Comment

    Here is a pretty good example of changing a font in TRichEdit
    LVL 7

    Author Comment

    what is the difference btw richedit and memo??
    LVL 4

    Accepted Solution

    TMemo component shows only simple text (one formating for all text), TRichEdit component shows Rich Text Format (*.rtf files) so text can be simply formated like bold, underline, italic, enumerations etc. Of course each parts of text can be formated seperately.
    TRichEdit allows you to apply only simply formating but it is depended on COM objects installed in the operating system so if you have never librarys (newer windows or MS Word installed on) then TRichText can show even tables.


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
    Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
    The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
    THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

    732 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

    21 Experts available now in Live!

    Get 1:1 Help Now