MCPcopy Index your code
hub / github.com/RustPython/RustPython / instate

Method instate

Lib/tkinter/ttk.py:545–557  ·  view source on GitHub ↗

Test the widget's state. If callback is not specified, returns True if the widget state matches statespec and False otherwise. If callback is specified, then it will be invoked with *args, **kw if the widget state matches statespec. statespec is expected to be a sequ

(self, statespec, callback=None, *args, **kw)

Source from the content-addressed store, hash-verified

543
544
545 def instate(self, statespec, callback=None, *args, **kw):
546 """Test the widget's state.
547
548 If callback is not specified, returns True if the widget state
549 matches statespec and False otherwise. If callback is specified,
550 then it will be invoked with *args, **kw if the widget state
551 matches statespec. statespec is expected to be a sequence."""
552 ret = self.tk.getboolean(
553 self.tk.call(self._w, "instate", ' '.join(statespec)))
554 if ret and callback is not None:
555 return callback(*args, **kw)
556
557 return ret
558
559
560 def state(self, statespec=None):

Callers

nothing calls this directly

Calls 4

callbackFunction · 0.50
getbooleanMethod · 0.45
callMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected