fully working wxpython+panda3d example

Hello Elkav. Thank you for the example. I tested your code: I am able to move camera aoround after I focus on the red panel. However, “OnMouseEvent”, “OnKeyDown” and “OnKeyUp” events of the MainWindow class never get called. Whenever the focus is on the Panda window, it recieves no events.

Does this code behave differently on your system? I am running Windows 7 64-bit, Python 2.7.5 64 bit. My Panda3D version is 1.9 and wxPython version is ‘3.0.2.0 msw (classic)’.

I also searched the forum and found this topic: How to setup panda and wxpython?
ynjh_jo offers a solution, using Viewport class. It works! Is this how it is supposed to be done? unfortunately, there is nothing in the documentation, and I don’t know neither wx nor Panda3D to figure out.