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)
| 368 | |
| 369 | |
| 370 | def map(self, style, query_opt=None, **kw): |
| 371 | """Query or sets dynamic values of the specified option(s) in |
| 372 | style. |
| 373 | |
| 374 | Each key in kw is an option and each value should be a list or a |
| 375 | tuple (usually) containing statespecs grouped in tuples, or list, |
| 376 | or something else of your preference. A statespec is compound of |
| 377 | one or more states and then a value.""" |
| 378 | if query_opt is not None: |
| 379 | result = self.tk.call(self._name, "map", style, '-%s' % query_opt) |
| 380 | return _list_from_statespec(self.tk.splitlist(result)) |
| 381 | |
| 382 | result = self.tk.call(self._name, "map", style, *_format_mapdict(kw)) |
| 383 | return {k: _list_from_statespec(self.tk.splitlist(v)) |
| 384 | for k, v in _splitdict(self.tk, result).items()} |
| 385 | |
| 386 | |
| 387 | def lookup(self, style, option, state=None, default=None): |
no test coverage detected