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

Method buttonbox

Lib/tkinter/simpledialog.py:165–181  ·  view source on GitHub ↗

add standard button box. override if you do not want the standard buttons

(self)

Source from the content-addressed store, hash-verified

163 pass
164
165 def buttonbox(self):
166 '''add standard button box.
167
168 override if you do not want the standard buttons
169 '''
170
171 box = Frame(self)
172
173 w = Button(box, text="OK", width=10, command=self.ok, default=ACTIVE)
174 w.pack(side=LEFT, padx=5, pady=5)
175 w = Button(box, text="Cancel", width=10, command=self.cancel)
176 w.pack(side=LEFT, padx=5, pady=5)
177
178 self.bind("<Return>", self.ok)
179 self.bind("<Escape>", self.cancel)
180
181 box.pack()
182
183 #
184 # standard button semantics

Callers 1

__init__Method · 0.95

Calls 4

FrameClass · 0.70
ButtonClass · 0.70
packMethod · 0.45
bindMethod · 0.45

Tested by

no test coverage detected