Switching between frames in tkinter menu

Here is a minimal example of one method I used recently; the key is in PythonGUI.show_frame, which moves the appropriate frame to the front for display. import Tkinter as tk class BaseFrame(tk.Frame): “””An abstract base class for the frames that sit inside PythonGUI. Args: master (tk.Frame): The parent widget. controller (PythonGUI): The controlling Tk object. … Read more

Tkinter PIL image not displaying inside of a function

It does not work inside function, since tkimg is garbage collected after function finishes. You need to bind your images into variables that wont be garbage collected. For example to global variables, or instance variables in a class, rather than local variables. To make tkimg be able to write to the global tkimg use global … Read more