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

Method theme_create

tools/python-3.11.9-amd64/Lib/tkinter/ttk.py:454–468  ·  view source on GitHub ↗

Creates a new theme. It is an error if themename already exists. If parent is specified, the new theme will inherit styles, elements and layouts from the specified parent theme. If settings are present, they are expected to have the same syntax used for theme_se

(self, themename, parent=None, settings=None)

Source from the content-addressed store, hash-verified

452
453
454 def theme_create(self, themename, parent=None, settings=None):
455 """Creates a new theme.
456
457 It is an error if themename already exists. If parent is
458 specified, the new theme will inherit styles, elements and
459 layouts from the specified parent theme. If settings are present,
460 they are expected to have the same syntax used for theme_settings."""
461 script = _script_from_settings(settings) if settings else ''
462
463 if parent:
464 self.tk.call(self._name, "theme", "create", themename,
465 "-parent", parent, "-settings", script)
466 else:
467 self.tk.call(self._name, "theme", "create", themename,
468 "-settings", script)
469
470
471 def theme_settings(self, themename, settings):

Callers 2

test_theme_createMethod · 0.80

Calls 2

_script_from_settingsFunction · 0.85
callMethod · 0.80

Tested by 2

test_theme_createMethod · 0.64