MCPcopy Index your code
hub / github.com/python/cpython / tk_setPalette

Method tk_setPalette

Lib/tkinter/__init__.py:734–746  ·  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

732 self.tk.call('tk_bisque')
733
734 def tk_setPalette(self, *args, **kw):
735 """Set a new color scheme for all widget elements.
736
737 A single color as argument will cause that all colors of Tk
738 widget elements are derived from this.
739 Alternatively several keyword parameters and its associated
740 colors can be given. The following keywords are valid:
741 activeBackground, foreground, selectColor,
742 activeForeground, highlightBackground, selectBackground,
743 background, highlightColor, selectForeground,
744 disabledForeground, insertBackground, troughColor."""
745 self.tk.call(('tk_setPalette',)
746 + _flatten(args) + _flatten(list(kw.items())))
747
748 def wait_variable(self, name='PY_VAR'):
749 """Wait until the variable is modified.

Callers 1

test_tk_setPaletteMethod · 0.80

Calls 4

listClass · 0.85
_flattenFunction · 0.70
callMethod · 0.45
itemsMethod · 0.45

Tested by 1

test_tk_setPaletteMethod · 0.64