Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Learn Python tkinter GUI buttons easy 🛎️
Play lesson

Python tkinter tutorial for beginners 🐍 - Learn Python tkinter GUI buttons easy 🛎️

5.0 (2)
22 learners

What you'll learn

This course includes

  • 5.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

You guys don't need all the button.config() calls, you can place them within the constructor if you want. I like to add comments line-by-line for teaching purposes to help explain. Do what works for you. Python Tkinter GUI button tutorial for beginners #Python #Tkinter #GUI #button #buttons #tutorial #beginners # 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()

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere