Modify or inquire widget state. Widget state is returned if statespec is None, otherwise it is set according to the statespec flags and then a new state spec is returned indicating which flags were changed. statespec is expected to be a sequence.
(self, statespec=None)
| 558 | |
| 559 | |
| 560 | def state(self, statespec=None): |
| 561 | """Modify or inquire widget state. |
| 562 | |
| 563 | Widget state is returned if statespec is None, otherwise it is |
| 564 | set according to the statespec flags and then a new state spec |
| 565 | is returned indicating which flags were changed. statespec is |
| 566 | expected to be a sequence.""" |
| 567 | if statespec is not None: |
| 568 | statespec = ' '.join(statespec) |
| 569 | |
| 570 | return self.tk.splitlist(str(self.tk.call(self._w, "state", statespec))) |
| 571 | |
| 572 | |
| 573 | class Button(Widget): |