[vtkusers] Change mouse cursor while hovering on vtkSphereWidget

Cory Quammen cory.quammen at kitware.com
Thu Oct 9 17:13:00 EDT 2014

I think you will have to subclass vtkSphereWidget2 and override the
SetCursor() method. The SetCursor() method for vtkHandleWidget is

void vtkHandleWidget::SetCursor(int cState)
  if ( this->ManagesCursor )
    switch (cState)
      case vtkHandleRepresentation::Outside:

I imagine you would want the same in your subclass.


On Thu, Oct 9, 2014 at 5:03 PM, junior <alok.theanomaly at gmail.com> wrote:
> Hi,
> I want the mouse cursor to change to a 'hand' when the mouse is hovering
> over a vtkSphereWidget.
> Is there any out of box solution for this or do I need to subclass? I tried
> using vtkSphereWidget2 and setting ManagesCursorOn() to true but that did
> not help.
> I see that the vtkAngleWidget exhibits the said behavior when mouse hovers
> above one of the three control points which in my understanding are
> vtkHandleWidgets.
> Any suggestions??
> Thanks
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Change-mouse-cursor-while-hovering-on-vtkSphereWidget-tp5729100.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers

More information about the vtkusers mailing list