MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / tk_setPalette

Method tk_setPalette

tools/python-3.11.9-amd64/Lib/tkinter/__init__.py:715–727  ·  view source on GitHub ↗

Set a new color scheme for all widget elements. A single color as argument will cause that all colors of Tk widget elements are derived from this. Alternatively several keyword parameters and its associated colors can be given. The following keywords are valid:

(self, *args, **kw)

Source from the content-addressed store, hash-verified

713 self.tk.call('tk_bisque')
714
715 def tk_setPalette(self, *args, **kw):
716 """Set a new color scheme for all widget elements.
717
718 A single color as argument will cause that all colors of Tk
719 widget elements are derived from this.
720 Alternatively several keyword parameters and its associated
721 colors can be given. The following keywords are valid:
722 activeBackground, foreground, selectColor,
723 activeForeground, highlightBackground, selectBackground,
724 background, highlightColor, selectForeground,
725 disabledForeground, insertBackground, troughColor."""
726 self.tk.call(('tk_setPalette',)
727 + _flatten(args) + _flatten(list(kw.items())))
728
729 def wait_variable(self, name='PY_VAR'):
730 """Wait until the variable is modified.

Callers 1

test_tk_setPaletteMethod · 0.80

Calls 4

listFunction · 0.85
callMethod · 0.80
_flattenFunction · 0.70
itemsMethod · 0.45

Tested by 1

test_tk_setPaletteMethod · 0.64