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

Method map

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

Query or sets dynamic values of the specified option(s) in style. Each key in kw is an option and each value should be a list or a tuple (usually) containing statespecs grouped in tuples, or list, or something else of your preference. A statespec is compound of

(self, style, query_opt=None, **kw)

Source from the content-addressed store, hash-verified

361
362
363 def map(self, style, query_opt=None, **kw):
364 """Query or sets dynamic values of the specified option(s) in
365 style.
366
367 Each key in kw is an option and each value should be a list or a
368 tuple (usually) containing statespecs grouped in tuples, or list,
369 or something else of your preference. A statespec is compound of
370 one or more states and then a value."""
371 if query_opt is not None:
372 result = self.tk.call(self._name, "map", style, '-%s' % query_opt)
373 return _list_from_statespec(self.tk.splitlist(result))
374
375 result = self.tk.call(self._name, "map", style, *_format_mapdict(kw))
376 return {k: _list_from_statespec(self.tk.splitlist(v))
377 for k, v in _splitdict(self.tk, result).items()}
378
379
380 def lookup(self, style, option, state=None, default=None):

Callers 4

compile_dirFunction · 0.45
test_mapMethod · 0.45
test_lookupMethod · 0.45
test_map_custom_copyMethod · 0.45

Calls 5

_splitdictFunction · 0.90
_list_from_statespecFunction · 0.85
_format_mapdictFunction · 0.85
callMethod · 0.80
itemsMethod · 0.45

Tested by 3

test_mapMethod · 0.36
test_lookupMethod · 0.36
test_map_custom_copyMethod · 0.36