[vtkusers] How to Display vtkRendererWidgets in a 2X2 grid

Yi-Yu Chou chouyiyu at hotmail.com
Mon Jun 28 17:49:11 EDT 2004


Dear vtk users,

I tried to display 4 vtkRendererWidgets arrayed in a 2x2 grid under python.
The method that I use is :

root = Tk()
frame1 = Frame(root).pack(side=TOP)
frame2 = Frame(root).pack(side=BOTTOM)
x_pane = vtkTkRenderWidget(frame1,width=200,height=200)
y_pane = vtkTkRenderWidget(frame1,width=200,height=200)
z_pane =  vtkTkRenderWidget(frame2,width=200,height=200)
all_pane =  vtkTkRenderWidget(frame2,width=200,height=200)

x_pane.pack(side=LEFT)
y_pane.pack(side=RIGHT)
z_pane.pack(side=LEFT)
all_pane.pack(side=RIGHT)
.....................................
Idealy, the arrangement would be like :

X | Y
-- | --
Z | all

However, I got some errors when running my code.
It seems that I can't use the syntax: vtkTkRendererWidget(frame1)
(I tried to display only one vtkTkRendererWidget by using 
vtkTkRendererWidget(root), and it worked).
Any ideas ?
Thanks in advance  !!!

_________________________________________________________________
來逛逛 MSN eShop:便利的購物環境、優質的網路商家,隨時有驚喜的優惠促銷等著您
! http://msn.com.tw/eshop 




More information about the vtkusers mailing list