From: Stef M. <s.m...@ru...> - 2009-01-15 20:24:06
|
CL wrote: > It seems there are quite a number of developers looking for simple > examples showing an integration of wxpython and vpython, I have just > written two examples and put it here: > http://code.google.com/p/vpythonex1/ (as my robot simulator is quite > complicated). > > In these examples, I try to use the docking technique described in > http://mientki.ruhosting.nl/data_www/pylab_works/pw_vpython_docking.html > > I use MoveWindow instead of SetWindowPos, in order to make it work on > the new version of vPython. I have not tested them on previous verion > of vPython. > > I just tried MoveWindow instead of SetWindowPos, but it crashes just as hard with VPython-5. Here is the essential part of the code: # get the handle of the dock container PP = self.p1.GetHandle () # Set Position and Size of the VPython window, # Before Docking it !! flags = win32con.SWP_SHOWWINDOW or \ win32con.SWP_FRAMECHANGED win32gui.SetWindowPos ( self.VP, win32con.HWND_TOPMOST, -4, -22, w+8, h+26, flags ) #win32gui.MoveWindow ( self.VP, -4, -22, w+8, h+26, True ) <===JUST AS BAD # Dock the VPython window win32gui.SetParent ( self.VP, PP ) Am I doing something wrong, or are you not testing hard enough ? cheers, Stef > This examples only work on Windows platform because the docking > technique is depending on win32 api. You can change it to non-docking > version easily by removing some code in vWorld object. > > Example 1 is just the bounce2 sample program implemented in a wxdialog box. > Example 2 is four bounce2 windows in a wxdialog box. > > Hope this can help you. > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > > |