当前位置: 首页>>代码示例>>Python>>正文


Python TkUtil.geometry_for_str方法代码示例

本文整理汇总了Python中TkUtil.geometry_for_str方法的典型用法代码示例。如果您正苦于以下问题:Python TkUtil.geometry_for_str方法的具体用法?Python TkUtil.geometry_for_str怎么用?Python TkUtil.geometry_for_str使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TkUtil的用法示例。


在下文中一共展示了TkUtil.geometry_for_str方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: close

# 需要导入模块: import TkUtil [as 别名]
# 或者: from TkUtil import geometry_for_str [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()
开发者ID:ShuyaMotouchi,项目名称:joke,代码行数:15,代码来源:Main.py

示例2: released

# 需要导入模块: import TkUtil [as 别名]
# 或者: from TkUtil import geometry_for_str [as 别名]
 def released(self, event):
     if self.dock is None:
         return
     self.set_drag_cursor(False)
     if self.winfo_containing(event.x_root, event.y_root) is None:
         # Dropped outside the window
         self.dock.undock(event.x_root, event.y_root)
     else:  # Dropped inside the window
         geometry = TkUtil.geometry_for_str(self.master.winfo_geometry())
         middle = geometry.x + (geometry.width // 2)
         if event.x_root < middle:
             self.dock.dock_left()
         else:
             self.dock.dock_right()
     self.x = self.y = self.dock = None
开发者ID:johnobrien,项目名称:PyPractice,代码行数:17,代码来源:Main.py

示例3: close

# 需要导入模块: import TkUtil [as 别名]
# 或者: from TkUtil import geometry_for_str [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()
开发者ID:GuoTianqi,项目名称:PythonInPractice-MarkSummerfield,代码行数:19,代码来源:Main.py


注:本文中的TkUtil.geometry_for_str方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。