Aui pane smeering on drag

I am getting a smear located where two pains meet after dragging the sash.
The smear stays until I click the mouse. It usually only happens on the bottom pain
after dragging the sash downward. I have attached an example of the application i’m
having a problem with.

test.py (2.85 KB)

Ok I fixed the smearing by importing aui from wx.lib.agw.aui instead of wx.aui. But
Now Im getting the following after closing the app:

TypeError: in method ‘GetTopLevelParent’, expected argument 1 of type ‘wxWindow *’
Traceback (most recent call last):

Also the AUI.py demo located at wxpython.org (wxPython2.8-win32-docs-demos) is also extremely
glitchy on my system. I was just wandering if this is normal.

I think there is a bug in the wx.lib.agw.aui module. I am using a MDIParentFrame as the main frame for
my app. It works fine if the wx.aui module is used instead of wx.lib.agw.aui. But if the latter is used and
if: 1. I have added panes to the aui manager
2. A child window has been created
I get the Error posted in my previous comment.

I have traced it and it looks like the EVT_AUI_RENDER is getting called even after the Frame is closed.

Any help will be really appreciated.