Комментарии:
Hi. I had multiple problems with the code as appearing in your video. I modified it a bit to work. I'm using python 3.10.6
import tkinter as tk
window = tk.Tk()
# Ori = window.state('zoomed')
window.geometry("800x700") # auto shows full size
def show_frame(frame_number):
frame_number.tkraise()
# window.rowconfigure(0,weight=1)
# window.columnconfigure(0,weight=1)
frame3 = tk.Frame(window, width=700, height=200, bg = 'black')
frame3.place(x=0,y=0)
frame2 = tk.Frame(window, width=700, height=200, bg = 'gray')
frame2.place(x=0,y=0)
frame1 = tk.Frame(window, width=700, height=200, bg = 'orange')
frame1.place(x=0,y=0)
# for frame in (frame1, frame2, frame3):
# frame.grid(row=0,column=10,sticky="nsew")
# ==========================
frame1_title = tk.Label(frame1, text="This is frame1", bg='skyblue')
frame1_title.place(x=30,y=50) # relative to 0,0 in the frame !!!!!!
frame1_btn = tk.Button(frame1, text='see Frame2', command=lambda:show_frame(frame2))
frame1_btn.place(x=30,y=100)
frame2_title = tk.Label(frame2, text="This is frame2", bg='yellow')
frame2_title.place(x=30,y=50) # relative to 0,0 in the frame !!!!!!
frame2_btn = tk.Button(frame2, text='see Frame3', command=lambda:show_frame(frame3))
frame2_btn.place(x=30,y=100)
frame3_title = tk.Label(frame3, text="This is frame3", bg='pink')
frame3_title.place(x=30,y=50)
frame3_btn = tk.Button(frame3, text='see Frame1', command=lambda:show_frame(frame1))
frame3_btn.place(x=30,y=100)
window.mainloop()
what's IDE setting? espacialy what's font?
ОтветитьFantastic tutorial, no need to create classes! Thank you so much!
ОтветитьThank you!
Ответитьi am having a problem that my frame3 is coming at 1st instead of frame1
Ответитьold video but just came across it and it helped me alot! This was just the thing i was looking for
ОтветитьHow did you make the color, fill the window?
Ответитьthank you so much for this tutorial, you really helped me a lot
ОтветитьThanks!
ОтветитьBrilliant video. If the user wants an image as the background, they will have to use a canvas. It is possible to do the same thing using canvases?
Ответитьis there anyway to do this with canvas? my program I'm trying to create heavily relies on canvas'.
ОтветитьThank you so much for this tutorial sir !!
ОтветитьI can't add exit button :/ can anyone help me ?
Ответитьthis code is not working with pack method please help.
ОтветитьBrilliant tutorial! very well explained. I just SUBSCRIBED
ОтветитьMassa o vídeo.
Ответитьwhat should we code if we want frame 1 as default and frame 2 , 3 should be under a menu button . when we click the menu button , i should get 2 options (frame 2 and frame 3) and when clicked the frame 2 or 3 , still the menu should be available and when we are in frame 2 or frame 3 , the menu button should show frame 1 so that i can go back to frame 1 .
please reply the code or make a video on it in short term . pls
can I ask u a question? can I double the layer without actually changing the back layer, for example, I have 2 layers, the first layer is the main layer, the second layer is like 'pop up' image with the blurry main layer behind it(without actually changing the data in the main layer)?
ОтветитьYou saved me man, ver very Thank you.. tomorrow is my hackathon project submission nd jst linking part was left
ОтветитьReally really Thanks!
ОтветитьAwesome video, python, java, flutter, which language I should choose to create a GUI app for rasbian (virtual environment), I want to create an app on my windows pc, and when it's done I just want to test how it is working in rasbian and than in real raspberry pi 4.
I don't want to install any additional module from the terminal, I want something that can directly run on rasbian
THANKS!!!
ОтветитьCan you please share the code with me
ОтветитьThank you very much. It was really useful
ОтветитьHey, thanks for the idea. I am trying to use it where I have 3 frames at a time on a screen and I just want to update only one frame but it isn't working for me?
Can you please help
Thanks a lot.
ОтветитьCool. Thanks man
ОтветитьBro is there any way that I can make dark to light theme switcher in tkinter?
ОтветитьThanks this is great basic tutorial for multiple pages gui
ОтветитьHow to go back from page 2 to page1?
ОтветитьGreat work man, this really helped me. 👍👍👍 Keep making such tutorials. ❤️❤️
ОтветитьThank you so much this is exactly what I needed. You made my work easy.
God bless you☺
I am korean and this is sooooooooooooo great for me. This videos is more helpful than korean blog sites thank you
ОтветитьWhy is this such a good video
ОтветитьHi bro, loved the video. Just a question tho, how can i make it like full size? In the intro you've got like these big frames but in the video they are small. Thanks
ОтветитьThanks, man! Greetings from Perú 🇵🇪
ОтветитьGreat video. Exactly what I was looking for. Btw, do you know how to create android apps using python? I just found Java but I don't want it.
ОтветитьI have a problem. It says, can't invoke pack command the application has been destroyed and I don't know why. ¿Cuold you help me to figure out what is wrong or what am I missing?
from tkinter import *
import time
#---------------------SHOW FRAMES------------------------
def show_frame(frame):
frame.tkraise()
window=Tk()
window.title("PPA")
window.config(bg="white")
window.state("zoomed")
frame1=Frame(window)
frame2=Frame(window)
frame3=Frame(window)
for frame in (frame1,frame2,frame3):
frame.pack()
frame1.config(bg="blue")
boton=Button(frame,width=10,height=2, relief="raised", text="SUBJECTS",fg="white",command=lambda:show_frame(frame2))
boton1.pack()
frame2.config(bg="black")
boton2=Button(frame,width=10,height=2, relief="raised", text="CALCULATOR",fg="white",command=lambda:show_frame(frame3))
boton2.pack()
frame3.config(bg="red")
boton3=Button(frame,width=10,height=2, relief="raised", text="MAIN MENU",fg="white",command=lambda:show_frame(frame1))
boton3.pack()
window.mainloop()
Broh can you share the code plz
ОтветитьThanks for the video. Really helpful
Ответитьwhen I run the program both show up and frame 2 wont disappear I'm using only 2 frames
ОтветитьNice video thank for this
ОтветитьThis is a really great tutorial, thank you so much you saved me from falling into a heavy frustration <3
Ответитьhow to solve it for a pin condition .
ОтветитьExcellent job dude
Ответитьi am having issues with the button name not being defined, idk what I did wrong and i followed your steps.
ОтветитьThank you ❤️, the other one is too hard for me.
ОтветитьThis is exactly what i was loking for! Thanks a lot.
Ответитьthe sound volume from intro is too loud. great tutorial
ОтветитьFinally I got this type of video. Thanks bro
Ответить