try to use wx.GraphicsContext in MainWindow.py