TreeMenuToggleButton#

class ansys.tools.visualization_interface.backends.pyvista.widgets.tree_menu_toggle.TreeMenuToggleButton(plotter, dark_mode: bool = False, tree_menu=None)#

Bases: ansys.tools.visualization_interface.backends.pyvista.widgets.widget.PlotterWidget

Provides a button to show/hide the tree menu widget.

This button toggles the visibility of the dynamic tree menu panel.

Parameters:
plotterPlotter

Plotter to draw the button on.

dark_modebool, optional

Whether to activate dark mode. Default is False.

tree_menuDynamicTreeMenuWidget, optional

The tree menu widget to toggle. If None, will search for it in plotter widgets.

Overview#

update

Assign the image that represents the button.

callback

Toggle the tree menu visibility.

Import detail#

from ansys.tools.visualization_interface.backends.pyvista.widgets.tree_menu_toggle import TreeMenuToggleButton

Method detail#

TreeMenuToggleButton.update() None#

Assign the image that represents the button.

TreeMenuToggleButton.callback(state: bool) None#

Toggle the tree menu visibility.

Parameters:
statebool

The state of the button (True = show menu, False = hide menu).