Reputation: 4363
I have a subclass of wxPanel inside a toplevel window with a couple of levels of wxSplitter above it. When the window is shown the some resizing and layout takes place. When it finishes the background of my panel has random junk (either black or other parts of the window) over some of its background. This seems to be a bug as it's using the bliting that is typically used to speed up scrolling, except that it's bliting from a location that doesn't belong to that panel.
Anyway, I figure I can fix it by making the window always repaint on resize and always draw the full contents of the wxPanel without any blitting. So: Is there any way to make it so the background of the wxPanel is always redrawn in full?
Upvotes: 4
Views: 1640
Reputation: 1987
You can try wxFULL_REPAINT_ON_RESIZE
style for your panel, see wxWindow
docs.
Another way is to catch wxEVT_SIZE
and call Refresh()
for the relevant panel (and maybe even Update()
after it although be careful as this will become a rather expensive op).
Upvotes: 5