def _show_history(self):
history_window = self._create_window('History')
history_window.resizable(height=False, width=False)
history_window.geometry('{0}x{1}+{2}+{3}'.format(200, 90, 300, 150))
history_label = ttk.Label(
history_window, text='Enter number: ', background=self.bg)
history_label.grid(row=0, column=0, padx=5, pady=5)
history_entry = ttk.Entry(history_window, width=10)
history_entry.grid(row=0, column=1, padx=5, pady=5)
history_entry.focus_set()
help_text = ttk.Label(history_window, text='Number of files (in history) to view.\n\nPress Enter when done.',
background=self.bg, foreground="#C0C0C0", anchor=CENTER, justify='center')
help_text.grid(row=1, column=0, columnspan=2, padx=5, pady=5)
history_window.bind('<Return>',
lambda event, entry_widget=history_entry, window=history_window: self._evaluate(event, entry_widget, window))
history_window.bind('<KP_Enter>',
lambda event, entry_widget=history_entry, window=history_window: self._evaluate(event, entry_widget, window))
评论列表
文章目录