Create basic 3 row x 3 col search (find) dialog. Other dialogs override subsidiary create_x methods as needed. Replace and Find-in-Files add another entry row.
(self)
| 73 | self.top.withdraw() |
| 74 | |
| 75 | def create_widgets(self): |
| 76 | '''Create basic 3 row x 3 col search (find) dialog. |
| 77 | |
| 78 | Other dialogs override subsidiary create_x methods as needed. |
| 79 | Replace and Find-in-Files add another entry row. |
| 80 | ''' |
| 81 | top = Toplevel(self.root) |
| 82 | top.bind("<Return>", self.default_command) |
| 83 | top.bind("<Escape>", self.close) |
| 84 | top.protocol("WM_DELETE_WINDOW", self.close) |
| 85 | top.wm_title(self.title) |
| 86 | top.wm_iconname(self.icon) |
| 87 | _setup_dialog(top) |
| 88 | self.top = top |
| 89 | self.frame = Frame(top, padding=5) |
| 90 | self.frame.grid(sticky="nwes") |
| 91 | top.grid_columnconfigure(0, weight=100) |
| 92 | top.grid_rowconfigure(0, weight=100) |
| 93 | |
| 94 | self.row = 0 |
| 95 | self.frame.grid_columnconfigure(0, pad=2, weight=0) |
| 96 | self.frame.grid_columnconfigure(1, pad=2, minsize=100, weight=100) |
| 97 | |
| 98 | self.create_entries() # row 0 (and maybe 1), cols 0, 1 |
| 99 | self.create_option_buttons() # next row, cols 0, 1 |
| 100 | self.create_other_buttons() # next row, cols 0, 1 |
| 101 | self.create_command_buttons() # col 2, all rows |
| 102 | |
| 103 | def make_entry(self, label_text, var): |
| 104 | '''Return (entry, label), . |
no test coverage detected