# Changing the interactor style when hovering an actor in VTK python

**URL:** https://discourse.vtk.org/t/changing-the-interactor-style-when-hovering-an-actor-in-vtk-python/10158
**Category:** Support
**Tags:** python
**Created:** [December 11, 2022, 2:12pm UTC](https://discourse.vtk.org/t/changing-the-interactor-style-when-hovering-an-actor-in-vtk-python/10158 "2022-12-11T14:12:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Raphael\_Lubaschewski](https://discourse.vtk.org/user_avatar/discourse.vtk.org/raphael_lubaschewski/32/6242_2.png) [@Raphael\_Lubaschewski](https://discourse.vtk.org/u/Raphael_Lubaschewski)
#### Post date: [December 11, 2022, 2:12pm UTC](https://discourse.vtk.org/t/changing-the-interactor-style-when-hovering-an-actor-in-vtk-python/10158/1 "2022-12-11T14:12:26Z")

</div>

I want to use the `TrackballCamera` InteractorStyle when I don’t hover my actor (a cylinder). In the case where the mouse is over the actor, I want to use the `TrackballActor` InteractorStyle.  
I know that it is possible to change the current InteractorStyle with the StyleSwitch Object. I created it like this:

```python
styleSwitch = vtk.vtkInteractorStyleSwitch()
styleSwitch.SetCurrentStyleToTrackballCamera()
self.interactor.SetInteractorStyle(styleSwitch)

```

I also know that i can change the current style by just calling one of the `styleSwitch.SetCurrentStyleTo...()` functions.

But how do I do this while hovering an Actor?
