[vtkusers] RE: [wxPython] VTK + wxPython flicker issue on Lin ux/GTK.

Miller, James V (CRD) millerjv at crd.ge.com
Fri Mar 9 08:14:07 EST 2001

I wonder if the SetParentInfo() method would help us separate Win32 builds from the internals of
tcl/tk.  When I tried to separate them before I could not get widgets to parent properly....

-----Original Message-----
From: Prabhu Ramachandran [mailto:prabhu at aero.iitm.ernet.in]
Sent: Friday, March 09, 2001 6:22 AM
To: David D. Marshall
Cc: Harris Scott R CIV AFRL/SNJM;
'wxpython-users at lists.sourceforge.net'; VTK users list; m. petrone
Subject: Re: [vtkusers] RE: [wxPython] VTK + wxPython flicker issue on


This is the promised update on the flicker issue with wxPython + VTK
on Linux with GTK.

In the earlier message I indicated that the C++ class wxVTKWindow
works fine when one changes the references to WindowId to ParentId.
As regards the Python code, the vtk.py shipped with wxPython sets the
WindowId by calling the wrapped function SetWindowInfo(char *) like

        hdl = self.GetHandle()

Since the flicker in the c++ class vanished when I used ParentId
instead of WindowId I proposed to add a new function called
SetParentInfo to the vtk classes.  I just did that and recompiled the
libVTKGraphics.so and libVTKGraphicsPython.so.  Then I changed the
wxPython/lib/vtk.py file to use this new function like so:

        hdl = self.GetHandle()

I am thrilled to say it now works like a charm!  No more flicker!!  I
also added an OnSize method to make the size change properly.  I guess
when I get a little more familiar with wxPython I will send in an
improved wxVTKRenderWindow class.

I did notice a silly problem with all the wxPython demos.  All of the
widgets do not seem to redraw on an expose event.  Is this a known

Meanwhile, I will send the VTK patches to the VTK list separately and
hope that the stuff gets added to both the CVS tree and also the
3.2beta branch.

Now there is nothing stopping me from learning wxPython properly!!

Thanks for all the help and patient listening. :)


This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:

More information about the vtkusers mailing list