<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.3502.5390" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I have a program containing one wxVTKRenderWindow
(see below). </FONT></DIV>
<DIV><FONT face=Arial size=2>The choice in the menu offers possibility to move
the wxVTKRenderWindow </FONT></DIV>
<DIV><FONT face=Arial size=2>from one panel to an other panel placed
around a splitter window. </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>To change the panel containing the
wxVTKRenderWindow, I'm using the Reparent</FONT></DIV>
<DIV><FONT face=Arial size=2>method. At this moment, a BadWindow mesage
appears from GTK (serail 48 error_code 3 minor_code 0)</FONT></DIV>
<DIV><FONT face=Arial size=2>I'm certain that the Reparent method of wxWindow is
the source of problem, but I haven't found solution.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>The goal of that is to move widget containing
wxVTKRenderWindow object from one panel to an other (the widget can have a
complex interface with VTK and wxWindow elements)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Greatings</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT></DIV>
<DIV><FONT face=Arial size=2>Program</FONT></DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial
size=2>////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT></DIV>from
wxPython.wx import *<BR>from vtkpython import *<BR>from wxVTKRenderWindow import
wxVTKRenderWindow</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>if __name__ == '__main__':<BR> import
sys<BR> import os</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> class TestApp(wxApp):<BR> def
OnInit(self):<BR> self.frame=wxFrame(None,-1,"dvwGrid",size=(640,480))</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial
size=2> self.splitter=wxSplitterWindow(self.frame,-1)<BR> self.left=wxPanel(self.splitter,-1)<BR> self.right=wxPanel(self.splitter,-1)<BR> self.splitter.SplitVertically(self.left,self.right,50)<BR> self.frame.Show(true)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial
size=2> self.onLeft=true<BR> self.window=wxVTKRenderWindow(self.left,-1)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> self.MakeMenu()</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial
size=2> EVT_SIZE(self.left,self.OnSize)<BR> EVT_SIZE(self.right,self.OnSize)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> return(true)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> def
MakeMenu(self):<BR> menu=wxMenu()<BR> menu.Append(6551,"Flit
window")<BR> mb=wxMenuBar()<BR> mb.Append(menu,"Edit")<BR> self.frame.SetMenuBar(mb)<BR> EVT_MENU(self.frame,6551,self.OnMenu)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> def
OnSize(self,event=None):<BR> if(self.onLeft):<BR> self.window.SetSize(self.left.GetSize())<BR> else:<BR> self.window.SetSize(self.right.GetSize())</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> def
OnMenu(self,event):<BR> if(self.onLeft):<BR> self.window.Reparent(self.right)<BR> else:<BR> self.window.Reparent(self.left)<BR> self.onLeft=not
self.onLeft<BR> self.OnSize()</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> #lancement de l'application<BR> app =
TestApp(0)<BR> app.MainLoop()<BR></FONT></DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT>
<DIV><FONT face=Arial
size=2>-----------------------------------------------------------------<BR>Benoit
Regrain<BR>Ingénieur d'études CNRS (Creatis)<BR>email : <A
href="mailto:regrain@creatis.insa-lyon.fr">regrain@creatis.insa-lyon.fr</A><BR>INSA
- Bâtiment Blaise Pascal<BR>7, avenue Jean Capelle<BR>F - 69621 Villeurbanne
Cedex</FONT></DIV></BODY></HTML>