[wxPython] window resize

I am trying to use DISLIN together with wxPython on a Unix platform (OSF 4.0D).
I have installed python 1.5.2, gtk+-1.2.8, and wxPython-2.1.16.
The problem I am having is that when I resize the window to a larger format the
window is repainted correctly but when I resize to a smaller format the window is
repainted but gets immediately cleared. After a resize to bigger I always get
wxEVENT_SIZE and 3*(wxEVENT_ERASE,wxEVENT_PAINT) with a resize to smaller :
wxEVENT_SIZE, wxEVENT_ERASE, wxEVENT_PAINT.

This is part of the code :

class _x11_canvas(wxPanel):
  def __init__(self,parent,ID=-1,pos=wxDefaultPosition,
               size=wxDefaultSize):
        wxPanel.__init__(self,parent,ID,pos,size)
        self.painter = None
        EVT_PAINT(self,self.OnPaint)
        EVT_SET_FOCUS(self,self.OnFocus)
        EVT_ERASE_BACKGROUND(self,self.OnErase)
        EVT_SIZE(self,self.OnSize)
        self.counter = 0

  def OnPaint(self,event):
        print "Paint : ",self.counter
        self.counter = self.counter + 1
        if self.painter:
            dislin.metafl('xwin')
            dislin.x11mod('store')
            dislin.setxid(self.GetHandle(),'window')
            pw,ph = self.GetClientSizeTuple()
            spw = pw*7
            sph = ph*7
            dislin.sclmod('full')
            dislin.page(spw,sph)
            self.painter.draw()
  def OnFocus(self,event):
        print "On Focus"
  def OnErase(self,event):
        print "On Erase"
  def OnSize(self,event):
        print "On Size"

···

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users