Didier Messages: 726 Registered: November 2008 Location: France
Contributor
Hi,
I wan't to do a ctrl that colors the characters following some defined rule.
I plan to use it in an Import Conflict Solver Dialog to display where exactly the differences are.
I used a Convert based class with overloaded Format() method to return QTF formated code string ... and EditString displays the QTF without processing it.
Is there a way to achieve such behavior ?? or some RichEditString ctrl maybe ?
I wan't to do a ctrl that colors the characters following some defined rule.
I plan to use it in an Import Conflict Solver Dialog to display where exactly the differences are.
I used a Convert based class with overloaded Format() method to return QTF formated code string ... and EditString displays the QTF without processing it.
Is there a way to achieve such behavior ?? or some RichEditString ctrl maybe ?
The main question is whether you want to allow the user to edit the content.
If no, simple Label will do, just add '\1' before the text (this will make Label to understand the content as QTF).
If yes, the widget you are looking for is RichEdit. You can customize it to look pretty EditString like... (but.. will the use be able to change colors of text? if yes, you will need some sort of menu or toolbar anyway, right?)