| 84 | ] |
| 85 | |
| 86 | def __init__(self, *args, **kwargs): |
| 87 | super().__init__(*args, **kwargs) |
| 88 | |
| 89 | self.target = None |
| 90 | self.memory = "" |
| 91 | |
| 92 | for y, row in enumerate(self.cells): |
| 93 | for x, item in enumerate(row): |
| 94 | b = tk.Button( |
| 95 | self, |
| 96 | text=item, |
| 97 | command=lambda text=item: self.append(text), |
| 98 | font=("Arial", 14), |
| 99 | bg="yellow", |
| 100 | fg="blue", |
| 101 | borderwidth=3, |
| 102 | relief="raised", |
| 103 | ) |
| 104 | b.grid(row=y, column=x, sticky="news") |
| 105 | |
| 106 | x = tk.Button( |
| 107 | self, |
| 108 | text="Space", |
| 109 | command=self.space, |
| 110 | font=("Arial", 14), |
| 111 | bg="yellow", |
| 112 | fg="blue", |
| 113 | borderwidth=3, |
| 114 | relief="raised", |
| 115 | ) |
| 116 | x.grid(row=0, column=10, columnspan="2", sticky="news") |
| 117 | |
| 118 | x = tk.Button( |
| 119 | self, |
| 120 | text="tab", |
| 121 | command=self.tab, |
| 122 | font=("Arial", 14), |
| 123 | bg="yellow", |
| 124 | fg="blue", |
| 125 | borderwidth=3, |
| 126 | relief="raised", |
| 127 | ) |
| 128 | x.grid(row=0, column=12, columnspan="2", sticky="news") |
| 129 | |
| 130 | x = tk.Button( |
| 131 | self, |
| 132 | text="Backspace", |
| 133 | command=self.backspace, |
| 134 | font=("Arial", 14), |
| 135 | bg="yellow", |
| 136 | fg="blue", |
| 137 | borderwidth=3, |
| 138 | relief="raised", |
| 139 | ) |
| 140 | x.grid(row=0, column=14, columnspan="3", sticky="news") |
| 141 | |
| 142 | x = tk.Button( |
| 143 | self, |