We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23c1549 commit 5256dcfCopy full SHA for 5256dcf
1 file changed
adafruit_button.py
@@ -336,3 +336,16 @@ def height(self, new_height):
336
if self.body:
337
self.append(self.body)
338
self.label = self.label
339
+
340
+ def resize(self, new_width, new_height):
341
+ """Resize the button to the new width and height given
342
+ :param new_width int the desired width
343
+ :param new_height int the desired height
344
+ """
345
+ self._width = new_width
346
+ self._height = new_height
347
+ self._empty_self_group()
348
+ self._create_body()
349
+ if self.body:
350
+ self.append(self.body)
351
+ self.label = self.label
0 commit comments