Events reference#
The following tables contain events that you may connect to. For example, to have a specific function called whenever the users
changes the number of dimensions displayed in the viewer (e.g.
from 2D to 3D), you can use <event>.connect(your_callback)
:
from napari.utils.events import Event
from napari import Viewer
def my_callback(event: Event):
print("The number of dims shown is now:", event.value)
viewer = Viewer()
viewer.dims.events.ndim.connect(my_callback)
Viewer events#
This is a stub. The real file is autogenerated in a full build.
LayerList events#
This is a stub. The real file is autogenerated in a full build.
Layer events#
Events listed for the base class Layer
are present on all layer types.
This is a stub. The real file is autogenerated in a full build.