trying to clear a window - making me crazy

Hello. I posted something similar recently, but since the list is moving, I figured I’d try it again.

I’m wanting to clear a wxScrolledWindow by filling it with its background color. I thought Clear()

would do this, but no luck.

Other alternatives I’ve thought of are just overlaying it with another window whenever it’s updated, but

this is problematic because the window to be cleared is the bottom window of a splitter window, and the top

is a ListCtrl that I really do not want to have to refresh.

thanks.

-Steve

Might want to post code, I use clear in my Paint handlers, and it seems to work…

def OnPaint( self, event ):
    '''Handle the drawing of the routes...'''
    context = wxPaintDC( self )
    self.PrepareDC( context )
    context.SetBackground(wxBrush(self.GetBackgroundColour()))
    context.Clear()
    context.BeginDrawing()

    ...

Good luck,

Mike

···

-----Original Message-----
From: Steve A. [mailto:aichele@mindspring.com]
Sent: Saturday, March 17, 2001 9:30 AM
To: wxpython-users@lists.wxwindows.org
Subject:
[wxpython-users] trying to clear a window - making me crazy

Hello. I posted something similar recently, but since the list is moving, I figured I’d try it again.

I’m wanting to clear a wxScrolledWindow by filling it with its background color. I thought Clear()

would do this, but no luck.

Other alternatives I’ve thought of are just overlaying it with another window whenever it’s updated, but

this is problematic because the window to be cleared is the bottom window of a splitter window, and the top

is a ListCtrl that I really do not want to have to refresh.

thanks.

-Steve