Plotter.add_text_slider_widget(callback, data, value=None, pointa=(0.4, 0.9), pointb=(0.9, 0.9), color=None, event_type='end', style=None)#

Add a text slider bar widget.

This is useless without a callback function. You can pass a callable function that takes a single argument, the value of this slider widget, and performs a task with that value.


The method called every time the slider is updated. This should take a single parameter: the float value of the slider.


The list of possible values displayed on the slider bar.

valuefloat, optional

The starting value of the slider.

pointatuple(float), optional

The relative coordinates of the left point of the slider on the display port.

pointbtuple(float), optional

The relative coordinates of the right point of the slider on the display port.

colorcolor_like, optional

Either a string, RGB list, or hex color string. Defaults to pyvista.global_theme.font.color.

event_typestr, optional

Either 'start', 'end' or 'always', this defines how often the slider interacts with the callback.

stylestr, optional

The name of the slider style. The list of available styles are in pyvista.global_theme.slider_styles. Defaults to None.


The VTK slider widget configured to display text.