Skip to content

Commit b669787

Browse files
Add max_length attribute
1 parent 6dfdd34 commit b669787

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

mats/tkwidgets.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ def __init__(
3737
start_btn: bool = True,
3838
abort_btn: bool = True,
3939
wrap: int = 6,
40+
max_length: int = 12,
4041
loglevel=logging.INFO,
4142
):
4243
self._logger = logging.getLogger(self.__class__.__name__)
4344
self._logger.setLevel(loglevel)
4445

46+
self._max_length = max_length
4547
self._parent = parent
4648
super().__init__(self._parent)
4749

@@ -214,7 +216,7 @@ def _update(self):
214216
except AttributeError:
215217
value_str = f"{value}"
216218

217-
max_length = 12
219+
max_length = self._max_length
218220
if value_str and len(value_str) <= max_length:
219221
label_text = f"{self._label_text}\n({value_str.strip()})"
220222
else:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "mats"
3-
version = "0.74.6"
3+
version = "0.74.7"
44
description = "Manufacturing Automated Test System, a framework for building device testing quickly and consistently"
55
authors = [
66
{name = "Jason R. Jones", email = "slightlynybbled@gmail.com"},

0 commit comments

Comments
 (0)