本文整理汇总了Python中TkUtil.str_for_geometry方法的典型用法代码示例。如果您正苦于以下问题:Python TkUtil.str_for_geometry方法的具体用法?Python TkUtil.str_for_geometry怎么用?Python TkUtil.str_for_geometry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TkUtil
的用法示例。
在下文中一共展示了TkUtil.str_for_geometry方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: close
# 需要导入模块: import TkUtil [as 别名]
# 或者: from TkUtil import str_for_geometry [as 别名]
def close(self, event=None):
settings = TkUtil.Settings.Data
settings.put(GENERAL, RESTORE, self.restore)
if self.restore:
geometry = TkUtil.geometry_for_str(self.master.geometry())
position = TkUtil.str_for_geometry(x=geometry.x, y= geometry.y)
settings.put(GENERAL, POSITION, position)
TkUtil.Settings.save()
if self.worker is not None and self.worker.is_alive():
self.state.value = TERMINATING
self.update_ui()
self.worker.join() # Wait for worker to finish
self.quit()
示例2: close
# 需要导入模块: import TkUtil [as 别名]
# 或者: from TkUtil import str_for_geometry [as 别名]
def close(self, event=None):
settings = TkUtil.Settings.Data
settings.put(BOARD, COLUMNS, self.board.columns)
settings.put(BOARD, ROWS, self.board.rows)
settings.put(BOARD, MAXCOLORS, self.board.maxColors)
settings.put(BOARD, DELAY, self.board.delay)
settings.put(BOARD, HIGHSCORE, self.board.highScore)
settings.put(GENERAL, SHAPENAME, self.shapeName.get())
settings.put(GENERAL, ZOOM, int(self.zoom.get()))
settings.put(GENERAL, SHOWTOOLBAR, bool(self.showToolbar.get()))
settings.put(GENERAL, RESTORE, self.restore)
if self.restore:
geometry = TkUtil.geometry_for_str(self.master.geometry())
position = TkUtil.str_for_geometry(x=geometry.x, y= geometry.y)
settings.put(GENERAL, POSITION, position)
TkUtil.Settings.save()
self.quit()