We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33df68e commit 0e558ecCopy full SHA for 0e558ec
ttkwidgets/utilities.py
@@ -19,7 +19,12 @@ def get_widget_options(widget):
19
:param widget: tkinter.Widget instance to get the config options from
20
:return: dict of options that you can pass on to widget.config()
21
"""
22
- return {key: widget.cget(key) for key in widget.keys()}
+ options = {}
23
+ for key in widget.keys():
24
+ value = widget.cget(key)
25
+ if value not in ("", None):
26
+ options[key] = value
27
+ return options
28
29
30
def copy_widget(widget, new_parent, level=0):
0 commit comments