[vtkusers] [VTK + wxPython + Linux] bug : Reparent with widgetcontaining wxVTKRenderWindow
Benoit Regrain
benoit.regrain at creatis.insa-lyon.fr
Fri Feb 7 12:09:19 EST 2003
I have made some tests concerning reparenting. With the method
SetNextWindowId placed in vtkXOpenGLRenderWindow
we can change properly the drawing window id. To use it in python, it is
necessary to have method SetNextWindowInfo, like we have SetWindowInfo.
I would know why you don't have write the method SetNextWindowId in class
vtkRenderWindow, and if you could make that and add the method
SetNextWindowInfo.
What must I make or send to you to have these modifications in the next VTK
nightly ???
I must work a little to python class wxVTKRenderWindow to have properly
code.
Greatings
Benoit Regrain
> 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
>
More information about the vtkusers
mailing list