IndexCounter

class ibb.widgets.IndexCounter(**kwargs: Any)[source]

Small widget that has a number input field and a label to set the index of something.
For end users, the range of the index is [1, total], but when accessing the index value, it is rescaled to [0, total).

Parameters

total (Integer) – Maximum index value

Examples

Warning

Note that the widgets are not responding as we do not have a python backend running!

[1]:
import ibb
[2]:
counter = ibb.widgets.IndexCounter(100)
counter
[2]:
[3]:
# Sets number to 16, as we start from 1 in the widget
counter.index = 15