How To Use Images as Backgrounds - Python Tkinter GUI Tutorial #147

How To Use Images as Backgrounds - Python Tkinter GUI Tutorial #147

Codemy.com

3 года назад

138,927 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Holy Piyush
Holy Piyush - 25.09.2023 21:28

Hello sir,
Sir when I run the code, it comes out good, but, after expanding the window to its maximum size, the background image does not fill the rest of the portion left on the window. Please help....
Thank you
Love from India

Ответить
Jordan Young
Jordan Young - 15.09.2023 19:18

when you resize the program window the background doesnt fill and the text is no longer centered. other than that your tutorial works well but the code please i need to see the whole window going back and fourth and replying alot makes it harder to read.

Ответить
shahriyar bolouri
shahriyar bolouri - 16.06.2023 11:50

good

Ответить
P. Jeevan
P. Jeevan - 14.06.2023 14:21

How to add image on it

Ответить
ኢትዮጵ ኑብያ
ኢትዮጵ ኑብያ - 10.06.2023 11:29

this isn't working for me
from tkinter import *
window = Tk()

window.geometry("800x700")
c=Canvas(window,bg="grey16",height=200,width=200)
filename = PhotoImage(file='C:/Users/omen/Downloads/image.gif')
background_lable=Lable(window,image=filename)
background_lable.place(x=0,y=0 ,relwidth=1, relheight=1)
c.pack()
window.mainloop()

Ответить
Fear Value
Fear Value - 22.05.2023 19:09

any idea how to make a matplotlib chart background transparent in a tkinter window!?

Ответить
Mahashiah
Mahashiah - 06.04.2023 04:41

how i can create a tk.text or tk.entry with fg= transparent?

Ответить
CL CHAN
CL CHAN - 14.10.2022 12:51

when doing in mac os, buttons still having background color

Ответить
Pouya Baniadam
Pouya Baniadam - 11.07.2022 08:02

Thanks John. That was great❤️

Ответить
THE INFAMOUS
THE INFAMOUS - 08.06.2022 10:35

I wish you were my python teacher in my college... I'm struggling a lot to learn python. From now onwards I won't cause I found you SIR. Thank you so much for your explanation. It was really an amazing explanation I have ever heard from anyone.....

Ответить
Zeeshan Alavi
Zeeshan Alavi - 02.06.2022 09:37

can we replace images with videos as background

Ответить
AbdEl-Rahman Sayed
AbdEl-Rahman Sayed - 09.05.2022 23:43

If you get the error that the image can't be read just remove 'root' from this line
bgimage_label = Label(root, image=bg_image)
and if the image is jpg, convert it to png

Ответить
Jacery
Jacery - 02.05.2022 02:45

You just earned a sub! Is there any way you could make a video on using videos or image sequences that loop as a background in tkinter?

Ответить
LOHITH REDDY
LOHITH REDDY - 01.04.2022 08:49

Hello sir
How to do the same with checkbutton, the background of the checkbutton is white,how do we change the background of the checkbutton to merge with background image please help me sir

Ответить
Vincantinho
Vincantinho - 25.03.2022 16:35

aint working

Ответить
Tejas V P
Tejas V P - 22.02.2022 18:54

Thanks

Ответить
Heavenly Kun
Heavenly Kun - 18.02.2022 14:55

i get a permission denied error when tkinter tries to open up an image .Any clue on how to fix?

Ответить
ScottTube
ScottTube - 11.02.2022 22:18

Noone dislikes anything????

Ответить
Abuzar Shaikh
Abuzar Shaikh - 07.02.2022 15:01

can you set a gif file as the background?

Ответить
M Ali Ahmadi
M Ali Ahmadi - 31.01.2022 04:58

Sours Cod?

Ответить
Funny Clips
Funny Clips - 14.01.2022 23:38

Wow! I've learned a lot from this video, thanks Elder👌🏾
Awesome!!!!

Ответить
Hamza Hassan
Hamza Hassan - 28.12.2021 11:04

Can we use background video in Tkinter using canvas?

Ответить
rose helen
rose helen - 18.11.2021 14:26

Can u plz tell how I can add button images with another image as a background
I've tried this method bit I get a grey square background in my button
I don't know how to get rid of that , I can't set a background colour cuz there are variety of colours in the bg image
Can u plz help

Ответить
Linuxuser1234
Linuxuser1234 - 18.11.2021 03:52

bg = PhotoImage(file="C:\Users\awips\Desktop\SMPTE.png.png")
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

Ответить
ProgrammingWithCybineer
ProgrammingWithCybineer - 07.11.2021 02:42

Thank you is not enough for you my friend. this was such a headache for me until i watched your video. thank you a million times over. you are truly one of a kind.😃😃😃❤❤💯💯

Ответить
Deepanshu Rai
Deepanshu Rai - 09.10.2021 14:33

Sir I'm getting error when I am using the "file" attribute and its shows blank white space if not used the fill attribute

Ответить
Mrinmay Das
Mrinmay Das - 29.09.2021 06:24

Can you show me how to make a live wallpaper using tkinter 🥺🥺

Ответить
Code Circus
Code Circus - 29.08.2021 04:20

Thank you for this video!

Ответить
Chiron Pugh
Chiron Pugh - 27.08.2021 20:41

I tried this (canvas method) and my image isn't being displayed properly. It hugs in the northwest corner but the image is too big. How do I make it so that the image fits perfectly inside of the window?

Ответить
Viktor
Viktor - 22.08.2021 01:24

Aaaand subscribe *click

Ответить
Peter Pacsay
Peter Pacsay - 20.08.2021 10:22

I am not sure, but I think it is only works if your image pixels are also 800x500

Ответить
Albert Piaggio
Albert Piaggio - 15.08.2021 03:29

i keep getting an error no such file or directory idk how to find it.

Ответить
EstudosAcadêmicos
EstudosAcadêmicos - 03.08.2021 03:10

Thank you teacher... very good...

Ответить
Muhd Zimam
Muhd Zimam - 22.07.2021 06:32

Can this be implement in raspberry pi ?

Ответить
PrimeX
PrimeX - 21.07.2021 07:27

any way to do the same for checkbuttons?

Ответить
Doraemon Nobita
Doraemon Nobita - 18.07.2021 01:58

thanks Walter white 😄

Ответить
BlazeXI
BlazeXI - 11.07.2021 06:42

Can i do this with gifs too?

Ответить
iamnobody
iamnobody - 01.07.2021 11:33

Well found today and gave a sub :) Thanks for providing such content

Ответить
Abhijit Mandal
Abhijit Mandal - 29.06.2021 08:38

I wish if i could like this video 100 times 😀👍🏻

Ответить
Aadil Sehrawat
Aadil Sehrawat - 25.06.2021 16:01

Thanks man, this helped !
After watching few of his videos, I am convinced that buying his courses is gonna be worth it ! 🙌🏻

Ответить
×NoName×
×NoName× - 23.06.2021 12:00

Why do I have "couldn't recognize data in image file"?

Ответить
Vaibhav Saran
Vaibhav Saran - 19.06.2021 23:34

Also I tried your code it does not work

Ответить
Vaibhav Saran
Vaibhav Saran - 19.06.2021 23:28

Could you please share your code Github Link makes it a lot easier to take the code for project

Ответить
Vaibhav Saran
Vaibhav Saran - 19.06.2021 23:28

You say check the pin comment where is it ??

Ответить
Ahmedk.n
Ahmedk.n - 06.06.2021 17:48

Can't I just make bg = None ? just a guess /:

Ответить
Paul Barsana
Paul Barsana - 05.06.2021 07:39

Thanks man 👍

Ответить
Pratyay Sarkar
Pratyay Sarkar - 04.06.2021 23:35

Man your videos are truly a lot of help! 🔥🔥

Ответить
Manar
Manar - 27.05.2021 20:22

Hello, I want to change the background. But it didn't work out. Can you help me?

Ответить