Python GUI with Tkinter - Adding an Image Button for playing Music - 4/30

preview_player
Показать описание
Day 4 - Today in this Python Project we will be learning how to add buttons to our Tkinter Python GUI

#tkinter #python #tkinter30
Рекомендации по теме
Комментарии
Автор

Great - how to turn an image into a button. Most Python Tkinter tuts have really basic buttons - this is next level shit! Just sub'ed :)

freeelectron
Автор

X = "LOL"
if x == "LOL"
print ("Hello world and shit...")
else:
print("Awww shit...")

TheRealBigBadBill
Автор

Hey ... Thats pretty nice but I am using idle instead of pycharm n I am not able to make button ....
So what should I do ....???
Pls help 🙏🙏🙏🙏🙏

rachitsahrawat
Автор

With lambda you can use the function with ( ):


def play_btn():
print("Working on " + cwd)

btn = Button(root, text="Play", command= lambda: play_btn ())


But not sure why? Any ideas? And most important, ¿it's some kind of penalty if I use lambda instead of just calling the function?

mrem
Автор

btn = Button(root, image=photo, command=play_btn()) will not show an error(probably).

It will instead execute the function as soon as the button is created. We don't need to click the button too. But on subsequent clicking it will not do anything too.

So yeah, logical error!

pran
Автор

I am enjoying your videos and shit...but I must take a piss :) No seriously I like your Python tuts!

freeelectron
Автор

I am following your series to learn Python GUI development. I did exactly as your tutorial is telling me, but my "Play this shit" button is not working. I am working on a Mac OS Mojave system using Python 3 and the Tkinter. Thank you for doing this!

tomcarroll
Автор

Hi - I am finding your series of videos very helpful. You should not use the "s**t" word as it will be regarded as improper in the UK for example. A daily newspaper would not print it.

iancarr
Автор

Pls work on your accent because I cant understand what are you talking about

swoosher
welcome to shbcf.ru