StopButton#

class ansys.tools.visualization_interface.backends.pyvista.widgets.stop_button.StopButton(plotter: pyvista.Plotter, animation, dark_mode: bool = False)#

Bases: ansys.tools.visualization_interface.backends.pyvista.widgets.button.Button

Provides stop control for animations.

This button stops the animation and resets to the first frame.

Parameters:
plotterPlotter

Plotter to draw the button on.

animationAnimation

Animation instance to control.

dark_modebool, optional

Whether to activate the dark mode or not.

Overview#

callback

Stop animation and reset to first frame.

Import detail#

from ansys.tools.visualization_interface.backends.pyvista.widgets.stop_button import StopButton

Method detail#

StopButton.callback(state: bool) None#

Stop animation and reset to first frame.

Parameters:
statebool

Whether the button is active.