[vtkusers] How to have multipe renderwindows using wxPython (and other wx questions).
Charl P. Botha
c.p.botha at ewi.tudelft.nl
Fri Jul 18 04:22:32 EDT 2003
Hi Maurice,
On Fri, 2003-07-18 at 12:10, Maurice van de Rijzen wrote:
> The problem now is that the in the left part of the window the correct
> renderer is displayed but not centered, it looks like the size command
> has no effect. Whereas the second widget is displayed correctly.
> Is this a problem of VTK or wx?
Could be either, but my guess is that this one is due to wx. In wx you
should make use of sizers instead of absolute coordinates... most people
find them difficult, but if you're used to the pack geometry manager of
TkInter it should pose no problems.
Another tip: the absolutely most effective way of getting help with
these problems is to create a code sample of 10 or 20 lines (at the
most) that demonstrates your problem. This code sample should be
immediately executable by anyone with the correct VTK and Python
installation. If you post this to the mailing list, the barrier of
entry for anyone wanting to help is suddenly much lower.
In addition, I can recommend using wxVTKRenderWindowInteractor instead
of wxVTKRenderWindow. It supports all the expected RWI semantics.
> How can I chech which version of VTK I'm using.
import vtk
print vtk.vtkVersion.GetVTKVersion()
> When I instaal the latest version of VTK(Nightly) does it standard
> include wx or do I have to do something extra.
> In the current example I include the definition of 'class
> wxVTKRenderWindow' in my source beacuse otherwise I get an messgae it
> doesn't know the wxVTKRenderWindow class. But I do use
> from wxPython.wx import *
from wxPython.wx import takes care of wx, but the wxVTKRenderWindow and
wxVTKRenderWindowInteractor classes are shipped with VTK, so you have to
import that separately.
Good luck,
Charl
--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/
More information about the vtkusers
mailing list