Place the widgets where they belong in the MarkovDemo frame.
(self)
| 81 | self.output_text = ScrolledText(self.output_frame, **self.TEXT) |
| 82 | |
| 83 | def place_widgets(self): |
| 84 | "Place the widgets where they belong in the MarkovDemo frame." |
| 85 | # Locate processing frame widgets. |
| 86 | self.processing_frame.grid(sticky=EW, **self.GRID) |
| 87 | self.decode_button.grid(row=0, column=0, **self.GRID) |
| 88 | self.encode_button.grid(row=0, column=1, **self.GRID) |
| 89 | self.freeze_button.grid(row=0, column=2, **self.GRID) |
| 90 | # Locate encoding frame widgets. |
| 91 | self.encoding_frame.grid(sticky=EW, **self.GRID) |
| 92 | self.chain_size_label.grid(row=0, column=0, sticky=W, **self.GRID) |
| 93 | self.chain_size_entry.grid(row=0, column=1, sticky=EW, **self.GRID) |
| 94 | self.plain_text_label.grid(row=1, column=0, sticky=W, **self.GRID) |
| 95 | self.plain_text_entry.grid(row=1, column=1, sticky=EW, **self.GRID) |
| 96 | self.encoding_frame.grid_columnconfigure(1, weight=1) |
| 97 | # Locate input frame widgets. |
| 98 | self.input_frame.grid(sticky=NSEW, **self.GRID) |
| 99 | self.input_text.grid(sticky=NSEW, **self.GRID) |
| 100 | self.input_frame.grid_rowconfigure(0, weight=1) |
| 101 | self.input_frame.grid_columnconfigure(0, weight=1) |
| 102 | # Locate output frame widgets. |
| 103 | self.output_frame.grid(sticky=NSEW, **self.GRID) |
| 104 | self.output_text.grid(sticky=NSEW, **self.GRID) |
| 105 | self.output_frame.grid_rowconfigure(0, weight=1) |
| 106 | self.output_frame.grid_columnconfigure(0, weight=1) |
| 107 | |
| 108 | def setup_widgets(self): |
| 109 | "Setup each widget's configuration for the events they handle." |