from tkinter import *
f1 = Frame(self)
label = Label(f1, text="Submit successful")
window = Tk()
frame = Frame(window)
btframe = Frame(window)
self.intro = Label(frame, text="hello", font =("Courier", 20, "bold"))
self.name = Label(frame, text="Name",foreground="red", font=("Helvetica",16,"bold"))
self.password = Label(frame, text="Password", foreground="blue", font=("Helvetica",16,"bold"))
self.entry1 = Entry(frame)
self.entry2 = Entry(frame)
self.submitB = Button(btframe, text="Submit", command=FirstFrame())
self.quitB = Button(btframe, text="Quit", command=window.destroy)
how to change the frame when a button is clicked
· October 14, 2015
Hello Guys, I tried many ways and I even looked at stackoverflow and I did get the answer but I dont understand how to do it.. So can you please help me how can I change the text from a frame when a button is clicked for example.... If I click the "Log In" button the frame should transition to the next frame which says "Log In Successful" but I understand how to do it ... here is my code..
Post a Reply
|Oldest Newest Rating|
· October 16, 2015
Sorry for ignoring your code, but it returns error.
Another advice in tkinter: DO NOT use pack() and grid() together.
So ignoring your code, below I (in fact i copy-pasted code from my school class) made simple button, that changes text. ( Pls take care of indentation, i am too lazy.)
If it helps, i can give you 2 more tkinter basics examples: entry that changes some text instantly, when u type in it.
This section is all about snakes! Just kidding.
|Bucky Roberts Administrator|