The issue is that the panel wouldn’t know how to redraw the rectangle if it was covered and then exposed.
I see. Let me think about that.
What I’m trying to do is paint a small rectangle onto a panel that is on the right side of my styledTextCtrl. This panel looks very much like a vertical scroll bar but it’s not. I’m using it to paint a small rectangle approximately where a found word is located within the whole text. So if I’m searching for the word ‘import’ and it finds it about 50% of the way into the file, the rectangle would be painted about 50% of the way down the panel. I have all of this working fine, I just need to paint it now.
I’m lost understanding WHEN the Bind event paints the rectangle? I feel like I don’t have control over WHEN that is painted? The panel is created when the styledTextCtrl is created. So the panel sits there, but I might not be searching for words. When I do search, THEN I want to paint the rectangles for the found words. So when do I attach the bind event?
The rectangles look something like this:
UPDATE: I got it working using wxStaticBitmap – thank you very much for the help.
