pygram.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:PyGram 作者: achillesrasquinha 项目源码 文件源码
def __init__(self,
                 window_aspect_ratio = PyGramConfig.WINDOW_ASPECT_RATIO,
                 window_width        = PyGramConfig.WINDOW_WIDTH,
                 window_height       = PyGramConfig.WINDOW_HEIGHT,
                 btngrid_rows        = PyGramConfig.BTNGRID_ROWS,
                 btngrid_cols        = PyGramConfig.BTNGRID_COLS,
                 resizable           = False):
        self.window_size  = (int(window_width), int(window_height))
        self.btngrid_size = (btngrid_rows, btngrid_cols)
        self.root         = tk.Tk()
        self.root.title('{name} v{version}'.format(
            name    = PyGramConfig.NAME,
            version = PyGramConfig.VERSION
        ))
        self.root.geometry('{width}x{height}'.format(
            width   = window_width + 2,
            height  = window_height
        ))
        self.root.resizable(width  = resizable,
                            height = resizable)
        self.frame        = PyGram.Frame(self.root,
                                         window_size  = self.window_size,
                                         btngrid_size = self.btngrid_size)
        self.frame.filemenu.add_command(label   = 'Open File',
                                        command = self.on_open_file)
        self.frame.filemenu.add_command(label   = 'Save',
                                        command = self.on_save)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号