Hi I am using BCB6 and have a memo component in my project. I want to change the color of a line(font color) depending on my message I need to display i.e. red color when I need to show an error message and black when no error. But when I change the font color it changes the color of all the previous lines in memo also. I am using a TMemo so that I can save all the data that has been displayed later on in a file. How do keep the font color of each line different? Is there any other component that could work instead?

Because TMemo is a wrapper for the Windows Edit Box, I don't think you will be able to have different formats for different parts of text in the same memo. I think you will do better using the TRichEdit control.

Hi Wolf,

I have tried TRichedit with the same result. I have also tried listbox also.

Regards

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.