add standard button box. override if you do not want the standard buttons
(self)
| 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 |