[vtkusers] Simple ContextView (2D API) problem
Eric E. Monson
emonson at cs.duke.edu
Mon May 24 08:52:01 EDT 2010
Hello,
I was trying to figure out something with the 2D API, but I'm having trouble with the mouse events. In this simple example, the block I create doesn't seem to actively respond to mouse events. Really it does, but they're just not rendered until I spin the scroll wheel on my mouse, and then you see the block suddenly move or turn red or resize as it's supposed to...
#======================
#!/usr/bin/env python
import vtk
cView = vtk.vtkContextView()
cItem = vtk.vtkBlockItem()
cItem.SetLabel('x')
cItem.SetDimensions(60,100,60,30)
cView.GetScene().AddItem(cItem)
iren = cView.GetRenderWindow().GetInteractor()
iren.Initialize()
iren.Start()
#======================
Can anyone point me to what's going wrong? I'm sure most things work fine since I use the parallel coordinates charts almost every day which are based on the same 2D API, but I must be leaving out some step.
Thanks,
-Eric
------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group
More information about the vtkusers
mailing list