Your video is very well explained. If I add a fews entries, then a value to each of them. How can I get each of the values and add them up? Here are the codes. Thanks from tkinter import * root=Tk() somme=0 def add_button(): global somme somme +=1 for i in range(somme): lab1=Label(root, text='lab1') lab1.grid(row=i, column=1) entry1=Entry(root) entry1.grid(row=i, column=2)
It was awesome, thnak you. btw, i tried, that the button.config arguments can write in one command, separate them with comma, like in your label video.
Gaw damn this was so much helpful, I’ve been looking for how to understand these buttons and labels n how to change the color too and you helped me a lot, thank you
The code I’m being told to use is tk.Button(text=“Click me!”, width=25,height=5, bg=“blue” , fg=“yellow” I type it exactly as my assignment tells me but nothing shows up . Btw I’m new to python so I’m obviously missing something I just don’t know what tho
i'm having trouble trying to run the code at 2:19. i try typing a tilde after "button.config(command=click)", but it gives me an error message. is there a solution to this?
Okay, but assuming I don't want a counter, but to switch with every button press between arrays of informations from a database that would be displayed on screen through the label, what would that be possible?
I have AttributeError when running button.config - The difference is I'm not using pack() because I'm setting up a TicTacToe game so I'm using grid. When I click the button, I'm calling a function that is supposed to update the text on the button.
Hey, I want to make a button . whose state =DISABLED , but when I enter something in textbox that button got enabled. from tkinter import * fenster = Tk() fenster.title("Window") def switch(): if b1["state"] == "normal": b1["state"] = "disabled" b2["text"] = "enable" else: b1["state"] = "normal" b2["text"] = "disable" #--Buttons b1 = Button(fenster, text="Button", height=5, width=7) b1.grid(row=0, column=0) b2 = Button(text="disable", command=switch) b2.grid(row=0, column=1) #copy the upper cody from stackflow and it's working but when i am going for same process in my project I am getting error on trace_add. Even I am not getting the code properly. Please reply
yes, the code I have provided you is perfect example how I want my button to work. You can copy and run it for better visualization. I didn't understand the code properly, so it will be helpful either you help me to understand the code or you can post any (video or code) in simple manner.
# button = you click it, then it does stuff
from tkinter import *
count = 0
def click():
global count
count+=1
label.config(text=count)
#label2.pack()
window = Tk()
button = Button(window,text='Click me!!!')
button.config(command=click) #performs call back of function
button.config(font=('Ink Free',50,'bold'))
button.config(bg='#ff6200')
button.config(fg='#fffb1f')
button.config(activebackground='#FF0000')
button.config(activeforeground='#fffb1f')
image = PhotoImage(file='point_emoji.png')
button.config(image=image)
button.config(compound='bottom')
#button.config(state=DISABLED) #disabled button (ACTIVE/DISABLED)
label = Label(window,text=count)
label.config(font=('Monospace',50))
label.pack()
button.pack()
label2 = Label(window,image=image)
window.mainloop()
Ok
Hey, can u show me all the packages u use? the function "Label" "Button" and a lot of functions aint working
hey how do i make the window 200,600 and how do i add multipule buttons and position them?
can you tell me the editor you used in this video
hey Bro look what I made
import tkinter
import tkinter as tk
y = ""
x = ""
def click():
x="I know it""\U0001F923"
label.config(text=x)
def click1():
y="wrong! you are Gay bro""\U0001F923"
label.config(text=y)
root = tk.Tk()
root.geometry("320x250")
root.title("from ayman to U")
label= tk.Label(root, text="are you Gay?""\U0001F642", font=("smart", 20))
label.pack()
button = tk.Button(root, text="Yes")
button.config(command=click)
button.config(font=("Ink free",15,"bold"))
button.config(bg="#f20587")
button.config(activebackground="#ff0000")
label = tk.Label(root, text=x)
label.config(font=("Ink free",20,"bold"))
label.pack()
button.pack()
button = tk.Button(root, text=" No")
button.config(command=click1)
button.config(font=("Ink free",15,"bold"))
button.config(bg="#302e2f")
button.config(activebackground="#34eb3d")
label = tk.Label(root, text=y)
label.config(font=("Ink free",20,"bold"))
label.pack()
button.pack()
root.mainloop()
Actually makes sense unlike the other tutorials that don't explain why..
I'm subscribing and liking now.
Cause There Indian?
This Was Seriously SUCH A USEFUL TUTORIAL. KEEP IT UP BRO!
Helped me a lot. Cheers!
Your video is very well explained.
If I add a fews entries, then a value to each of them. How can I get each of the values and add them up?
Here are the codes. Thanks
from tkinter import *
root=Tk()
somme=0
def add_button():
global somme
somme +=1
for i in range(somme):
lab1=Label(root, text='lab1')
lab1.grid(row=i, column=1)
entry1=Entry(root)
entry1.grid(row=i, column=2)
bouton_add=Button(root, text='Create widget', command=add_button )
bouton_add.grid(row=5, column=0)
root.mainloop()
Isnt there a way to set the color of the button when the other parameters are being filled out? Like: button(root, text=" " , bg= 'red' ) ?
great tutorial! helpful and fun!
oh thank you very much I will subscribe🎉
It was awesome, thnak you.
btw, i tried, that the button.config arguments can write in one command, separate them with comma, like in your label video.
The professionalism is surprising, but welcome.
He deserves the profile picture
that''s really cool!!!
Finally learned to use buttons, nice
Gaw damn this was so much helpful, I’ve been looking for how to understand these buttons and labels n how to change the color too and you helped me a lot, thank you
*_Amazing video! I already am saying that before the tutorial began!_* 😀👍
lol then watch the tutorial youll like it more
@@zed2000mc Okay, but I don't want now.
brief, to the point ... super
keep it up
Thanks i learnt more commands!
And sooo good at teaching
I can understand it very fast 😊😊😊
Thanks to your tutorial I learned something logic
Another one is amazing in the discription
Thanks for easy writing of code
😃😃😃😃😃
Nice concise guide. Simple.
The code I’m being told to use is tk.Button(text=“Click me!”, width=25,height=5, bg=“blue” , fg=“yellow” I type it exactly as my assignment tells me but nothing shows up . Btw I’m new to python so I’m obviously missing something I just don’t know what tho
Figured it out . I forgot to use Button.pack()
10:40 OMG YOU ARE THE BEST. NEVER FOUND THIS ANYWHERE. Thank you so much. Like and sub!😱😱😱
hi, I have a question, what program r u using? Great video btw, rlly helped
is it tkinter?
Nevermind, it's called Pycham, thanks for the video!
Great video. Thank you for writing the code in the comment. It is very helpful
you are so good to teach :) thank you very much
Wow!
relly helpful
could u explain how to make the button bigger or change its postion
very good video ty !
I'm Still New To tkinter So Can You Please Explain .pack()
This was so helpful thnxs
Thanks man that's awesome
Thank you helped me a lot
I dont want the counter. Can u show me how to put the text in the same window as the button when u press it?
Would this be reasonable for creating a DAW?
thank you 😊
i'm having trouble trying to run the code at 2:19. i try typing a tilde after "button.config(command=click)", but it gives me an error message. is there a solution to this?
Love this guy...😂
Okay, but assuming I don't want a counter, but to switch with every button press between arrays of informations from a database that would be displayed on screen through the label, what would that be possible?
Which extension pack should I download?
Great video , thanks for the code i understood it so now i can make an app
Only on buttons?
bro i am havinf problem named.... Tk() is not defined plz help me dude
What are you coding that on?
I have a question if we are on android(Acode) do this will work
I COMMECNTED OMG
I want you to make a video about how to change button text also when clicked
print("cool vid")
Thanks
Amazing but how to change the postion and size of the button and lable
Also borders
thank you bro🙏
from tkinter import *
window = Tk()
window.title("Error Generator")
window.geometry("1000x1000")
window.resizable(False, False)
def click():
window=Tk()
window.title("Error!")
button=Button(window,text="GenerateError")
button.config(command=click)
button.pack()
window.mainloop().
i updated the error a bit
from tkinter import *
window = Tk()
window.title("Error Generator")
window.geometry("1000x1000")
window.resizable(False, False)
def click():
error_window = Toplevel(window) # Use Toplevel for creating a new window
error_window.title("Error!")
# Create a label with the critical message
message_label = Label(error_window, text='Something critical happened! Fix it now!', bg='#FF0000', fg='#FFFFFF', font=('Arial', 12, 'bold'))
message_label.grid(row=0, column=0, columnspan=3, padx=10, pady=10)
# Create buttons
button = Button(error_window, text='Fix', bg='#00FF00', fg='#000000', activebackground='#00FF00', activeforeground='#000000')
button2 = Button(error_window, text='Do not fix', bg='#FF0000', fg='#000000', activebackground='#FF0000', activeforeground='#000000')
# Grid buttons below the message label
button.grid(row=1, column=0, padx=5, pady=5)
button2.grid(row=1, column=1, padx=5, pady=5)
button = Button(window, text="Generate Error", command=click)
button.pack(pady=20)
window.mainloop()
One more question which module in python is best
Sorry for soo many comments
👍
I have AttributeError when running button.config - The difference is I'm not using pack() because I'm setting up a TicTacToe game so I'm using grid. When I click the button, I'm calling a function that is supposed to update the text on the button.
Why do I get error window = Tk()
NameError: name "Tk" is not defined
:(
think you
bro can you make file upload button with basic ui for a proper idea (Not for html)?
Noice thanks for the code
does anyone know how to make it so that when the button is holded it calles the same function as the command one you wrote
Made beautiful angry chicken button
Hey, I want to make a button . whose state =DISABLED , but when I enter something in textbox that button got enabled.
from tkinter import *
fenster = Tk()
fenster.title("Window")
def switch():
if b1["state"] == "normal":
b1["state"] = "disabled"
b2["text"] = "enable"
else:
b1["state"] = "normal"
b2["text"] = "disable"
#--Buttons
b1 = Button(fenster, text="Button", height=5, width=7)
b1.grid(row=0, column=0)
b2 = Button(text="disable", command=switch)
b2.grid(row=0, column=1)
#copy the upper cody from stackflow and it's working but when i am going for same process in my project I am getting error on trace_add. Even I am not getting the code properly. Please reply
Do you have the textbox part of the code?
yes, the code I have provided you is perfect example how I want my button to work. You can copy and run it for better visualization. I didn't understand the code properly, so it will be helpful either you help me to understand the code or you can post any (video or code) in simple manner.
ok. that sounds difficult to do but I will research and see what I can find.
Wows fantastic🤘😝🤘 code ya..
😆😆😆😍🥰😇
i don't understand,, how can i download this version of python??
for some reason only the folder the python file was in just opened and nothing else happened. can someone help me?
is this on virtual code studio
how do you make it so when you click the button once, it plays a sound?
I was wondering the same thing
first to watch
Here ya go:🥇
can we be friends and share code when need
How do I do two commands at the same time?
no, you can't do it
?
?
why?
because you can't do it
Hi
i just want to help you that is why a commented
the image doesn't work for me
Bro help me how to import an image with a phone please i beg of you
The back ground doesn't work
he can you get me a download link to the image please
There isn't a download link for this. I used photoshop to increase the size of standard emojis ad saved as a .png : 👆
@@BroCodez ok thanks
hello
image directory is not found error pls help
font dosn't work
heres my comment
the count doesn't work for me
nevermind