where and how to redraw the buttons in a panel

hello all

I am implementing a calculator with wxPython in a Windows app. the calculator resides in MyPanel which is derived from wx.Panel, and contains 20ish buttons in a GridSizer. I have some jpgs that get successfully drawn in the buttons, but everything gets loused up when I move the window, or resize it.

What is my best bet here? I tried a buffered dc per button, and a call to BufferedPaintDC with each dc from MyPanel.OnPaint, but only the first two draw. (There is no error displayed.) Any suggestions would be welcome.

I also need to knwo how and when to redraw a tree control, which uses custom images.

THANKS

Kurt