I have two functions that are part of a Python 3.4.1 Tkinter GUI.
def jumpto():
global jump
jump = Tk()
jump.wm_title(\"Jump\")
jump.focus_force(
The thing is that you're making two instances of Tk()
, which leads to strange behavior. The jump
window should be a Toplevel window, which is the window to use if you want another window next to your Tk()
window.
close
needs to accept an argument because it is called by a bind
which always passes an event object which contains all kinds of information about the event that triggered the close
function (things like mouse position and the key that was used to trigger the event). So calling it event
instead of self
would actually be more correct. self
is a variable used in classes which contains class attributes.