Hi all!
Does anybody know how to get rid of the annoying window redraw flicker when resizing a wxFrame instance (more specifically, that of my class that inherits from it)? I looked at the docs, and found this:
"wxCLIP_CHILDREN -- Use this style to eliminate flicker caused by the background being repainted, then children being painted over them. Windows only."
But calling SetWindowStyleFlag(wxCLIP_CHILDREN) on the instance of my class changes nothing. Besides, I lose the title bar when I set the flag!
All of the examples in the demo flicker. Is it really impossible to do? Do I need to inherit my class from wxWindow, instead of wxFrame?
···
###################################################
Here's the code:
class MyFrame(wxFrame):
def __init__(self, title):
wxFrame.__init__(self, NULL, -1, title,
size = wxSize(600, 400))
self.SetWindowStyleFlag(wxCLIP_CHILDREN)
class MyApp(wxApp):
def OnInit(self):
frame = MyFrame('Test')
frame.Show(true)
self.SetTopWindow(frame)
return true
app = MyApp(0)
app.MainLoop()