diff --git a/README.md b/README.md index a9687950..3785a28d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ![Usage](https://img.shields.io/badge/Usage-Terminal%20User%20Interface-yellow) ![Python](https://img.shields.io/badge/Python-v3.8%5E-green?logo=python) ![pyTermTk_version](https://img.shields.io/github/v/tag/ceccopierangiolieugenio/pyTermTk?label=version) -[![Test Status](https://img.shields.io/github/workflow/status/ceccopierangiolieugenio/pyTermTk/Testing?label=tests)](https://github.com/ceccopierangiolieugenio/pyTermTk/actions?query=workflow%3Atesting) +[![Test Status](https://img.shields.io/github/actions/workflow/status/ceccopierangiolieugenio/pyTermTk/testing.yml?branch=main&label=tests)](https://github.com/ceccopierangiolieugenio/pyTermTk/actions?query=workflow%3Atesting) [![pypi_version](https://img.shields.io/pypi/v/pyTermTk?label=pypi)](https://pypi.org/project/pyTermTk) [![pypi_version](https://img.shields.io/twitter/follow/Pier95886803?style=social&logo=twitter)](https://twitter.com/hashtag/pyTermTk?src=hashtag_click&f=live) diff --git a/TermTk/TTkWidgets/spinbox.py b/TermTk/TTkWidgets/spinbox.py index d6d810b1..e6dab2b6 100644 --- a/TermTk/TTkWidgets/spinbox.py +++ b/TermTk/TTkWidgets/spinbox.py @@ -75,6 +75,13 @@ class TTkSpinBox(TTkWidget): self.setValue(int(str(text))) self._lineEdit.setText(str(self._value)) + def wheelEvent(self, evt): + if evt.evt == TTkK.WHEEL_Up: + self.setValue(self._value+1) + else: + self.setValue(self._value-1) + return TTkLineEdit.wheelEvent(self._lineEdit, evt) + def keyEvent(self, evt): if evt.type == TTkK.SpecialKey: if evt.key == TTkK.Key_Up: