Using Icons, Images, and Exit Buttons - Python Tkinter GUI Tutorial #8

preview_player
Показать описание
How to use Icons, Images, and Exit Buttons with TKinter and Python. In this video learn how to use icons, images, and exit buttons in tkinter. Tkinter images, TKinter Exit Buttons, and TKinter icons are pretty easy - see how in this video!

In this series I'll show you how to create graphical user interfaces for Python with Tkinter. TKinter comes with Python already, so there's nothing to install!

✅ Watch The Other Videos In This Python Playlist:

▶️ See More At:

✅ Join My Facebook Group:

✅ Subscribe To My YouTube Channel:

Take $22 off with coupon code: youtube
Рекомендации по теме
Комментарии
Автор

▶️ Watch Entire Tkinter Playlist ✅ Subscribe To My YouTube Channel:
▶️ See More At: ✅ Join My Facebook Group:

Codemycom
Автор

This is the best playlist I can find on python GUI. Amazing.

prakulsingla
Автор

One of the best instructors on YouTube. Your explanations and format are great. I am going to sign up for your full program. Thanks for all your hard work.

cbaymac
Автор

For new people, PIL is in all caps. Also, you add Pillow from the command line with pip install Pillow. (Stack overflow apparently says its deprecated)
Also, ImageTk, the "k" is not capitalized. It drove me nuts for about an hour before figuring it out.
Also thank you for this video. Awesome content.

Zachomara
Автор

I have a no words ....frankly speaking i enjoying a lot..thank you so much for your efforts for those can't afford paid courses..love you from

myselfsohit
Автор

Man, you are explaining things just the way I would do. Perfect, thank you very much.

marisko
Автор

To avoid resizing put:
# app = your root
app.resizable(width=False, height=False)

keymediastudioitself
Автор

Hey buddy, so awesome...very useful. I have been searching tkinter gui tutorials and fortunately, i found u😃😃

alwayscubing
Автор

Thanks for vid, really help. I feel so lucky that I have access to so much information(and tutorials) without any charge.

greatindianbuilder
Автор

Great Tutorial! I'm watching this 5 years later, but there's a function called Eval() in python. You could use this to make it a scientific calculator and make the evaluation function just evaluate the string.

mehhh._.
Автор

Great job deserving of thanks
عمل رائع يستحق الشكر

ashrsfsiliman
Автор

Man you are my new favorite hero! thanks!

jorgearmandoperez
Автор

Those who are getting delayed by the exit button: You can use root.destroy instead of root.quit

TahmidulAzomSany
Автор

You are so good... You are my hero! You know everything in Python...

ozbekchawindows
Автор

Great series, thank you very much. What I do find irritating about these software packages, IDEs etc is this trend to add plugins and packages afterwards. Never complete. It's like buying a car and discovering you still need a spare wheel, side view mirrors... Oh, do you need an engine too, sir ? No problem, just download it ! :)

Spacekriek
Автор

Walter White teaches Tkinter like a boss.

Capsaicinophile
Автор

Thank you so much. It didn't work for me, but made some tweak to make it work.
Old code -

Tweak i have done - img=ImageTk.PhotoImage(Image.open(path), master=root)

rahulsailwal
Автор

Thanks it was great & very useful♥♥

yashar
Автор

In Linux, one has to do this to put an icon in the title bar:
import tkinter as tk
root = tk.Tk()
root.title('CharDB: PC Record Database App')
root.tk.call('wm', 'iconphoto', root._w,
root.geometry("1152x648")
In Linux the iconbitmap() call can only use the XBM image format due to limitations of X-Windows system. XBM is a binary color format -- on or off, so images must be in B&W; no grey-scale or colors. Thus one needs to use a PhotoImage() call to put a custom icon in the title bar.

drednot
Автор

The iconbitmap() method seems to be a Windows only thing. For those using Linux (and possible MacOS - I don't have access to a Mac to verify this), another way of setting the icon must be taken. It took some effort to figure this out, so I'll share it here. This is the simplest way of doing it, there are more complex ways for multiple-size icons, etc.

First, the .ico file format can't be used, so the image should be a PNG file.
Then, the following code must be used, assuming that (as we do here), the root window is in a variable called root.

root.iconphoto(False,

The file name can be just the image file name if it is in the current working directory during script execution or any absolute or relative path.

Not all GUI environments in Linux have the window icon in the top left corner, but this also sets the icon used in the task bar.

Colaholiker
visit shbcf.ru