I'm currently using RichMemo for a chat window in one of my applications. My basic requirements for the component I use is that:
1. It handles different colors, fonts and backgrounds.
2. It has word wrap.
3. It is fully cross-platform (Windows, Mac, Linux).
(And if it can handle images and/or links that is a bonus)
The only thing I've found so far is RichMemo, but I've hit some snags with it. For Mac it currently works fine for me. The snags are in it's Microsoft Window's behavior, which is different than it's behavior on Mac.
The first issue is that there are two ways on Windows which you can color a new line of text that appears on the chat. You can either add the line, then color it. In this case you can color it any way you want, but there is a visible repaint for the user, which looks very odd and buggy in a chat. They see a line added in one color and then the color changes a second later. The other option is you can color things before adding a line, by changing the coloration at the end of the present line, but you can only do so for the whole line. So you can change the end color of an old line to green and when you add a new line the whole line will be green. You also cannot append to a line. Use of the .Apprend procedure actually creates a new line contrary to what you'd expect. On Mac there is no visible repaint when you add a line and then recolor the line, so that's why this isn't an issue on Mac.
However, there doesn't seem to be any way to color part of the line one color and part of the line another color without a visible repaint in Windows. That is what I am trying to do. This is common in chat applications, where the person's nickname is one color and the rest of the line is another color, for example.
The other thing I'd like to do is have clickable links or other clickable info inside the TRichMemo, like if a person types a http address, they could simply click the address to open it in their browser. I also didn't see any way to do that. I'd appreciate any help anyone could give me on either of these topics.
I'm even open to using other components and checked some out, but lzRichEdit was not cross-platform (no Mac support) and the Lazarus version of SynEdit did not have word wrap.
Any ideas to help me get RichMemo painting a single line multiple colors without a refresh or getting web links working in a RichMemo chat?