Connect *func* as callback function to changes of the slider value. Parameters ---------- func : callable Function to call when slider is changed. The function must accept a 2-tuple of floats as its argument. Returns -------
(self, func)
| 1014 | self._observers.process("changed", (vmin, vmax)) |
| 1015 | |
| 1016 | def on_changed(self, func): |
| 1017 | """ |
| 1018 | Connect *func* as callback function to changes of the slider value. |
| 1019 | |
| 1020 | Parameters |
| 1021 | ---------- |
| 1022 | func : callable |
| 1023 | Function to call when slider is changed. The function |
| 1024 | must accept a 2-tuple of floats as its argument. |
| 1025 | |
| 1026 | Returns |
| 1027 | ------- |
| 1028 | int |
| 1029 | Connection id (which can be used to disconnect *func*). |
| 1030 | """ |
| 1031 | return self._observers.connect('changed', lambda val: func(val)) |
| 1032 | |
| 1033 | |
| 1034 | def _expand_text_props(props): |