Page 1 of 1

How can I color a text?

Posted: 28 Jan 2014 11:20
by ahmednadi
Dear Sirs;
Could you help me to color a string with Red color?
How can I used setforegroundcolor predicate to color a string with colors and put the strings in editControl.

Regards;
AHMED

Posted: 28 Jan 2014 16:16
by Thomas Linder Puls
You can't. setForegroundColor is defined on a textControl, not on an editControl.

It is non-standard to change the font color (a doubt that you can find an edit control in Windows uses another color).

Anyways, it is not trivial to make such a change, we have only implemented it for textControls, because somebody insisted on writing red alert messages, even though it is non-standard.

Posted: 28 Jan 2014 16:46
by Tonton Luc
Hi,

Maybe this following post can help you : http://discuss.visual-prolog.com/viewto ... 7341#27341

Posted: 30 Jan 2014 7:18
by ahmednadi
Dear Sirs;
Thank you.
I want to color a string with specific color and then put this string in editControl as a part of the whole text.
What is the command or tool used to do this?
You fast action will be highly appreciated.
Regards;
AHMED

Posted: 8 Feb 2014 17:52
by dominique f pannier
Hi,
If you want edit colored text, you should not use an editControl, but a form in which you add a custom control sciLexer.
With this new combination in VIP 7.4, you can color each part of text you want with the color you want, and also the font, and its attributes, etc. ad libitum.