Recenter your window after it's been moved or the size changed. This is a conveinence method. There are no tkinter calls involved, only pure PySimpleGUI API calls.
(self)
| 11241 | pass |
| 11242 | |
| 11243 | def move_to_center(self): |
| 11244 | """ |
| 11245 | Recenter your window after it's been moved or the size changed. |
| 11246 | |
| 11247 | This is a conveinence method. There are no tkinter calls involved, only pure PySimpleGUI API calls. |
| 11248 | """ |
| 11249 | if not self._is_window_created('tried Window.move_to_center'): |
| 11250 | return |
| 11251 | screen_width, screen_height = self.get_screen_dimensions() |
| 11252 | win_width, win_height = self.size |
| 11253 | x, y = (screen_width - win_width) // 2, (screen_height - win_height) // 2 |
| 11254 | self.move(x, y) |
| 11255 | |
| 11256 | def minimize(self): |
| 11257 | """ |
nothing calls this directly
no test coverage detected