We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d18dcd commit 044c03aCopy full SHA for 044c03a
adafruit_button/button_base.py
@@ -68,7 +68,7 @@ def __init__(
68
self._height = height
69
self._font = label_font
70
self._selected = False
71
- self.name = name
+ self._name = name
72
self._label = label
73
self._label_color = label_color
74
self._label_font = label_font
@@ -157,3 +157,12 @@ def label_color(self):
157
def label_color(self, new_color):
158
self._label_color = _check_color(new_color)
159
self._label.color = self._label_color
160
+
161
+ @property
162
+ def name(self) -> str:
163
+ """The name of the button"""
164
+ return self._name
165
166
+ @name.setter
167
+ def name(self, new_name: str) -> None:
168
+ self._name = new_name
0 commit comments