Hello all, i was just wondering how you can make a button link to another page, for instance i want the help option on my start menu to link to a help page, if you can understand this can you please supply a small snippet of code, here is my code if it will be of any use.
from Tkinter import *
def startMenu():
top = Tk()
top.title("Checkers")
top = Canvas(width="800", height="800")
## Creates the black and white square background
size = 100
cols = 8
rows = 8
squareList = []
for i in range(cols):
for j in range(rows):
if j%2: colours = ["black", "white"]
else: colours = ["white", "black"]
squareList.append(top.create_rectangle(i*size, j*size,
i*size+size, j*size+size,
fill=colours[i%2]))
## Creates the Checkers Heading
frame1 = Frame(top, relief=GROOVE, borderwidth=2)
label1 = Label(frame1, text='Checkers', font=('Arial', 48), fg="blue")
label1.pack(side="left")
top.create_window(540, 300, window=frame1, anchor=SE)
top.pack(fill='both', expand='yes')
## Creates the Start Button
frame2 = Frame(top, relief=GROOVE, borderwidth=2)
button1 = Button(frame2, text='Start', font=('Arial', 28), fg="blue")
button1.pack(side="left")
top.create_window(457, 450, window=frame2, anchor=SE)
top.pack(fill='both', expand='yes')
## Creates the Option Button
frame3 = Frame(top, relief=GROOVE, borderwidth=2)
button2 = Button(frame3, text='Options', font=('Arial', 28), fg="blue")
button2.pack(side="left")
top.create_window(480, 550, window=frame3, anchor=SE)
top.pack(fill='both', expand='yes')
## Creates the Help Button
frame4 = Frame(top, relief=GROOVE, borderwidth=2)
button3 = Button(frame4, text='Help', font=('Arial', 28), fg="blue")
button3.pack(side="left")
top.create_window(458, 650, window=frame4, anchor=SE)
top.pack(fill='both', expand='yes')
## Creates the Exit Button
frame5 = Frame(top, relief=GROOVE, borderwidth=2)
button4 = Button(frame5, text='Quit',command=quit, font=('Arial', 28), fg="blue")
button4.pack(side="left")
top.create_window(455, 750, window=frame5, anchor=SE)
top.pack(fill='both', expand='yes')
startMenu()