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

Class Button

Lib/tkinter/__init__.py:2832–2876  ·  view source on GitHub ↗

Button widget.

Source from the content-addressed store, hash-verified

2830
2831
2832class Button(Widget):
2833 """Button widget."""
2834
2835 def __init__(self, master=None, cnf={}, **kw):
2836 """Construct a button widget with the parent MASTER.
2837
2838 STANDARD OPTIONS
2839
2840 activebackground, activeforeground, anchor,
2841 background, bitmap, borderwidth, cursor,
2842 disabledforeground, font, foreground
2843 highlightbackground, highlightcolor,
2844 highlightthickness, image, justify,
2845 padx, pady, relief, repeatdelay,
2846 repeatinterval, takefocus, text,
2847 textvariable, underline, wraplength
2848
2849 WIDGET-SPECIFIC OPTIONS
2850
2851 command, compound, default, height,
2852 overrelief, state, width
2853 """
2854 Widget.__init__(self, master, 'button', cnf, kw)
2855
2856 def flash(self):
2857 """Flash the button.
2858
2859 This is accomplished by redisplaying
2860 the button several times, alternating between active and
2861 normal colors. At the end of the flash the button is left
2862 in the same normal/active state as when the command was
2863 invoked. This command is ignored if the button's state is
2864 disabled.
2865 """
2866 self.tk.call(self._w, 'flash')
2867
2868 def invoke(self):
2869 """Invoke the command associated with the button.
2870
2871 The return value is the return value from the command,
2872 or an empty string if there is no command associated with
2873 the button. This command is ignored if the button's state
2874 is disabled.
2875 """
2876 return self.tk.call(self._w, 'invoke')
2877
2878
2879class Canvas(Widget, XView, YView):

Callers 1

_testFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected