[vtkusers] wxVTKRenderWindowInteractor Problem on Win32 [Resolved]
Paul
massivemonkeymayhem at gmail.com
Wed Jul 22 10:45:43 EDT 2009
The code in my previous email didn't make much sense, sorry about
that. It was extricated/reduced from a larger program by a
temperamental monkey who didn't do a very good job (haven't fed him in
a while)..
It turns out that the problem is caused by "style = wx.SIMPLE_BORDER"
on the vtkrwi. It makes the vtkrwi window incorrectly grow in size
when you move or resize the containing frame under Windows.
If you add "style = wx.SIMPLE_BORDER" to the vtkrwi in
wxVTKRenderWindowInteractorConeExample() in
wxVTKRenderWindowInteractor.py you should see this behaviour (in
Windows). This could be symptomatic of a broader problem with wx.
So, don't use borders on wxVTKRenderWindowInteractor() until further notice.
Paul
On Tue, Jul 21, 2009 at 4:29 PM, Paul <massivemonkeymayhem at gmail.com> wrote:
>
>
> ---------- Forwarded message ----------
> From: Paul Doucet <pauljoeyd at gmail.com>
> Date: Tue, Jul 21, 2009 at 4:26 PM
> Subject: wxVTKRenderWindowInteractor Problem on Win32
> To: wxpython-users at lists.wxwidgets.org, vtkusers at vtk.org
>
>
> I've been having this frustrating problem running my WX/VTK application on Windows platforms. On Linux/GTK it's fine.
>
> The render window seems to grow in size by its own accord, getting larger than the containing panel/frame. Many seemingly non-obvious things seem to trigger this. For instance, if I drag the Window frame and move it around the screen, the render window inside gets progressively bigger. This size increase is reflected in the widget's reported size (panel.GetSize() < widget.GetSize()). The render window ("widget") seems to get sporadic OnSize() events as I drag around the containing frame around, although in principal it shouldn't. The sizes reported by event.GetSize() during the OnSize() events are wrong as well.
>
> If I replace wxVTKRenderWindowInteractor with wxVTKRenderWindow, everything is fine. wxVTKRenderWindow doesn't get any OnSize() events when I move the frame around.
>
> Any ideas?
>
>
> wx-Python 2.8.10.1
> Python 2.5.4
> Latest wxVTKRenderWindowInteractor.py
>
> code:
>
> frame = wx.Frame(parent=None, title='Fix me!')
> display = Display(self.f, self)
> panel = wx.Panel(self, frame, style = wx.SIMPLE_BORDER | wx.NO_FULL_REPAINT_ON_RESIZE)
>
> widget = wxVTKRenderWindowInteractor(self, wx.ID_ANY, size=wx.Size(100,100), style=wx.SIMPLE_BORDER | wx.NO_FULL_REPAINT_ON_RESIZE)
>
> panel.Layout()
> widget.Enable(True)
>
>
>
More information about the vtkusers
mailing list