MCPcopy Index your code
hub / github.com/python/cpython / buttonbox

Method buttonbox

Lib/tkinter/simpledialog.py:168–184  ·  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

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

Callers 1

__init__Method · 0.95

Calls 4

FrameClass · 0.90
ButtonClass · 0.90
packMethod · 0.45
bindMethod · 0.45

Tested by

no test coverage detected