[vtkusers] [VTK + wxPython + Linux] bug : Reparent with widget containing wxVTKRenderWindow

Charl P. Botha c.p.botha at its.tudelft.nl
Tue Feb 4 11:25:30 EST 2003


On Tue, 2003-02-04 at 16:29, Benoit Regrain wrote:
> I have a program containing one wxVTKRenderWindow (see below). 
> The choice in the menu offers possibility to move the
> wxVTKRenderWindow 
> from one panel to an other panel placed around a splitter window. 
>  
> To change the panel containing the wxVTKRenderWindow, I'm using the
> Reparent
> method. At this moment, a BadWindow mesage appears from GTK (serail 48
> error_code 3 minor_code 0)
> I'm certain that the Reparent method of wxWindow is the source of
> problem, but I haven't found solution.

vtkRenderWindow doesn't support this kind of reparenting.  With some
changes to the VTK code (basically creating a SetNextWindow{Info,Id}
abstract call in the base vtkRenderWindow, implementing it in all
specialisations and making sure that their WindowRemap() calls honour
the NextWindowId ivar, which is currently only true for X OpenGL and
Win32 OpenGL) it could be done.

However, it's probably easier for you to create a new wxVTKRenderWindow
in the new panel, add the vtkRenderer(s) of the old RWI to it and then
destroy the old wxVTKRenderWindow.  Note that I haven't tested this.

Good luck,
Charl

-- 
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/



More information about the vtkusers mailing list