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.
Sorry for my poor email-formatting and coding skills. I must have been
drunk as I wrote it leaving the office.
Anywhoo, the code I included was extricated/reduced from a rather
large program - obviously I didn't quite finish the job. Most of you
probably picked up that I was going for an absolute barebones
wxVTKRenderWindowInteractor example (app/frame/panel/vtkrwi).
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 frame under Windows.
If you add "style = wx.SIMPLE_BORDER" to the vtkrwi in
wxVTKRenderWindowInteractorConeExample() in
wxVTKRenderWindowInteractor.py you should see this behaviour. This
could be symptomatic of a broader problem. As soon as the bug tracker
returns to service I'll submit a bug.
Paul
···
On Jul 21, 5:05 pm, Paul <massivemonkeymay...@gmail.com> wrote:
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.
Sorry for my poor email-formatting and coding skills. I must have been
drunk as I wrote it leaving the office.
Anywhoo, the code I included was extricated/reduced from a rather
large program - obviously I didn't quite finish the job. Most of you
probably picked up that I was going for an absolute barebones
wxVTKRenderWindowInteractor example (app/frame/panel/vtkrwi).
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 frame under Windows.
If you add "style = wx.SIMPLE_BORDER" to the vtkrwi in
wxVTKRenderWindowInteractorConeExample() in
wxVTKRenderWindowInteractor.py you should see this behaviour. This
could be symptomatic of a broader problem. As soon as the bug tracker
returns to service I'll submit a bug.
I doubt there is anything in wx that would cause this, as people use panels with borders all the time. Perhaps VTK has a problem if the ClientSize != Size.