I need to show about 35 lines (of approx 80 chars in width each) of colored text, meaning different colors along the line. This text will be updated when the user uses the Pageup/pagedown keys.
First thing I thought about was a Richedit. I can't put all the text in the rich edit at once, as a change on the first page will change the text on the second page (for example). So therefore, I need to catch all the pageup/pagedown keys and update the screen myself. Rather than clearing the richedit each time and readding all the lines, I have 35 lines permanently in the listview and simply change the lines as the data in them changes.
Now although this works, it creates a large amount of flickering as the richedit control itself seems to completely blank out the control and then redraw all the text each time I update.
Is there anyway around this? I don't mind handling the redraw myself, but it doesn't seem like this is possible. I'm using C++ Builder 6.
What I've tried so far is that before and after all work is done in the richedit, use the LockWindowUpdate function, send the SETREDRAW message to the control, and even the VCL's built in "Richedit1->Lines->Begin/EndUpdate" function. However, none of these seem to work - they all have the same flicker.
It seems the only way around this problem would be to draw onto a bitmap and place this on top of the form directly (kind of Doublebuffered display). However, the Richedit does not support Doublebuffered mode, and I don't want to rewrite the control from scratch.