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)
评论列表
文章目录