python - wxpython: How can I redraw something when a window is retored? -


In my wx.frame-based wxpython application, I have to draw some lines on a panel when some event is created by making a wx.ClientDC example Are needed when needed The only problem is that if the window is minimized and then restored, the lines disappear!

Thank you!

Only you should be pictured at wx.EVT_PAINT, so bind the event to init

  self.bind (wx. EVT_PAINT, self._onPaint) In _onPaint, use wx.PaintDC such as  
  DC = wx.PaintDC (self) dc.DrawLine (0,0,100,100)  < / Pre> 

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -