1
我将如何建立一个Tkinter的窗口坐标(500×500大小),这样的(0,0)点在左下角,而(500×500)是在右上角?谷歌没有太多的帮助。设置的Tkinter窗口的坐标
def graphDisplay(distance, elevation):
'''draws up the graph.'''
#creates a window
root = Tk()
#sets the name of the window
root.title("Graph")
#sets the size of the window
root.geometry("500x500")
#sets the background of the window
root.configure(background='green')
#create a canvas object to draw the circle
canvas = Canvas(root)
#runs the program until you click x
root.mainloop
不要忘记在最后调用'mainloop',用:'root.mainloop()' –