Dynamically Resize Background Images - Python Tkinter GUI Tutorial

  Рет қаралды 27,880

Codemy.com

Codemy.com

Күн бұрын

Пікірлер: 83
@Codemycom
@Codemycom 4 жыл бұрын
▶️ Watch Entire Tkinter Playlist ✅ Subscribe To My KZbin Channel: bit.ly/2UFLKgj bit.ly/2IGzvOR ▶️ See More At: ✅ Join My Facebook Group: Codemy.com bit.ly/2GFmOBz ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt! Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN ▶️ Get The Code bit.ly/3fWyCjd
@JA-ym1tc
@JA-ym1tc Жыл бұрын
Why do I need to alt tab out and in to the window to resize it
@SergejsDmitrijevs-jo2du
@SergejsDmitrijevs-jo2du Жыл бұрын
Thanks!
@Codemycom
@Codemycom 6 ай бұрын
Welcome!
@DIYGURUJI
@DIYGURUJI 4 жыл бұрын
I made my school project look way better by watching your videos
@Codemycom
@Codemycom 4 жыл бұрын
Awesome!
@tr0janPopeye
@tr0janPopeye 4 жыл бұрын
You are a great teacher Love to take guidance from you about tkinter
@Codemycom
@Codemycom 4 жыл бұрын
Thanks, I appreciate that!
@rishabthutheja859
@rishabthutheja859 Жыл бұрын
Hello Sir. Thanks a lot for this helpful video. But there is a run time error in my program. The error is that, in my code is that whenever i interact with a button, a smaller size of my background image shows up on the left top corner of my window. And when i click another button, the same copy of the background image resizes in the corner., and the background image reverts back to its originally defined size. Why is this happening?
@kirollssabri4651
@kirollssabri4651 4 жыл бұрын
Thanks for your quick response to my question ❤️
@Codemycom
@Codemycom 4 жыл бұрын
Sure thing
@kirollssabri4651
@kirollssabri4651 4 жыл бұрын
@@Codemycom you are great teacher❤️
@Codemycom
@Codemycom 4 жыл бұрын
@@kirollssabri4651 Thank you!
@codingstudio8865
@codingstudio8865 4 жыл бұрын
Sir, how to resize *title and borderless window*
@Codemycom
@Codemycom 4 жыл бұрын
Same way you resize any window...
@ambientsoda106
@ambientsoda106 Жыл бұрын
how do you make the image cover the top of the window where close and file is, as with modern games?
@Codemycom
@Codemycom Жыл бұрын
You would likely remove that top bar. I have videos on that.
@DodacLA
@DodacLA 7 ай бұрын
That i had to set everything as Global within the Function is exactly what i was missing and nowhere did i find that it was that important for resizing on the fly. Was getting furstrated that the exact same code initially used to set the image didn't work within a function for some reason
@Codemycom
@Codemycom 7 ай бұрын
Yeah, tkinter garbage collection weirdness...
@achrafchrouda981
@achrafchrouda981 2 жыл бұрын
you saved my life!! this video is amazing thank you for uploading it !!!
@Codemycom
@Codemycom 2 жыл бұрын
You're welcome!!
@funnyclips2696
@funnyclips2696 2 жыл бұрын
Pretty nice! But the Welcome text is just hanging on air....
@aaroncatolico7550
@aaroncatolico7550 2 жыл бұрын
How would you resize the image on a separate thread? The reason I ask is because the image looks choppy & flashes as it's being updated on the main thread. Oh, and it's causing a little bit of lag on the main thread.
@yashaswikulshreshtha1588
@yashaswikulshreshtha1588 Жыл бұрын
Maybe just call the bind in seperate thread I guess
@mansimishra7089
@mansimishra7089 2 жыл бұрын
How to add bgimg in previously written function?
@Codemycom
@Codemycom 2 жыл бұрын
make your image variable global
@mohammadsorour1
@mohammadsorour1 3 жыл бұрын
when i resize the widnow it get laggy + we i add the image in the function the background image which defined in the first place doesn't disappear
@עמילווינשטיין
@עמילווינשטיין 6 ай бұрын
hi, I have the same problem, did you figure it out?
@mohammadsorour1
@mohammadsorour1 6 ай бұрын
@@עמילווינשטיין no, i used .net with wpf instrad
@lakpatamang2866
@lakpatamang2866 2 жыл бұрын
How can we do so for the video feed from opencv?
@shrinivaschaurasia6666
@shrinivaschaurasia6666 4 жыл бұрын
It seems you are moving towards responsive applications with tkinter.
@Codemycom
@Codemycom 4 жыл бұрын
Bit by bit :-p
@arnavpandey1722
@arnavpandey1722 4 жыл бұрын
Woah never thought you can do this with Tkinter! you are great *_*
@Codemycom
@Codemycom 4 жыл бұрын
Thanks!
@jash4305
@jash4305 2 жыл бұрын
Sir, make a video to upload & retrieve images in database and display images on tkinter GUI window !!!!
@fargolrakhshan2168
@fargolrakhshan2168 2 жыл бұрын
Thanks for the the video, it's really helpful. But I have a problem that I can't dynamically resize multiple images on the same root with this code, they either the size of the whole page or they are too small, can you please help me?
@hayethayet65
@hayethayet65 2 жыл бұрын
BUT ho w can resize also "welcome!" plz give me the soulution
@Codemycom
@Codemycom 2 жыл бұрын
You can resize a label any time using .config() and setting whatever size you want in config.
@syntaxerror1044
@syntaxerror1044 4 жыл бұрын
Hey I'm learning Ruby on Rails from your freecodecamp video. Thanks a lot
@Codemycom
@Codemycom 4 жыл бұрын
Awesome, enjoy! I also have tons of Rails courses at Codemy.com
@syntaxerror1044
@syntaxerror1044 4 жыл бұрын
@@Codemycom I'll definitely check it out. Thanks
@archanajs1184
@archanajs1184 3 жыл бұрын
Hi I'm new to tkinter. I know how to add frame to root but how to add it in canvas?Is it like any other widget you place it as a window? If so, how do you put other widgets on the frame?
@Codemycom
@Codemycom 3 жыл бұрын
Check the playlist, I believe I have a video on that
@akarshgupta2586
@akarshgupta2586 4 жыл бұрын
could you please make a video on how to restrict the user from opening the same type of window widget more than once
@Codemycom
@Codemycom 4 жыл бұрын
An if statement would do that for you...in the function that opens the window...if it's open, don't do anything, otherwise, open it.
@akarshgupta2586
@akarshgupta2586 4 жыл бұрын
@@Codemycom I tried using a try except block for the following and yet I keep getting errors
@bronborn416
@bronborn416 4 жыл бұрын
Sir Jon elder were from you
@Codemycom
@Codemycom 4 жыл бұрын
Las Vegas
@matteoscalas4084
@matteoscalas4084 3 жыл бұрын
anyone who has problems with PIL? Any alternative library to use?
@Codemycom
@Codemycom 3 жыл бұрын
Yeah PIL gives a lot of people trouble..
@matteoscalas4084
@matteoscalas4084 3 жыл бұрын
​@@Codemycom I manage to find a way to resize images using pygame, I will have to figure out a way to adapt that to be the background
@keglobecommunity4805
@keglobecommunity4805 2 жыл бұрын
resized_bg = bg1.resize((e.width,e.height),Image.ANTIALIAS) I`m getting this error can someone help
@Codemycom
@Codemycom 2 жыл бұрын
what error?
@keglobecommunity4805
@keglobecommunity4805 2 жыл бұрын
@@Codemycom ANTIALIAS is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.LANCZOS instead. please help me SIr
@Codemycom
@Codemycom 2 жыл бұрын
@@keglobecommunity4805 That's not an error, it's a warning you can ignore.
@akankshaubale6491
@akankshaubale6491 4 жыл бұрын
Sir Please make a video of Taking Screenshot in tkinter python
@Codemycom
@Codemycom 4 жыл бұрын
most keyboards have a screenshot button already
@akankshaubale6491
@akankshaubale6491 4 жыл бұрын
@@Codemycom I means , with using the pyautogui module how to do this with python programming
@AmanPatel-lo3ce
@AmanPatel-lo3ce 4 жыл бұрын
John create a video on tkhtml view so that we can use html tags inside tkinter...It's really useful and simple.
@Codemycom
@Codemycom 4 жыл бұрын
It's been discontinued
@ricardodagnonihuelsmann3379
@ricardodagnonihuelsmann3379 4 жыл бұрын
Thank you for your work, and congratulations for the channel! Could you make videos about resizing images on buttons?
@Codemycom
@Codemycom 4 жыл бұрын
Thanks! Interesting suggestion...
@ricardodagnonihuelsmann3379
@ricardodagnonihuelsmann3379 4 жыл бұрын
@@Codemycom This has been a great challenge for a beginner like me. At the moment I left the window with fixed widht/height. By the way, I have another suggestion: is it possible to place images on the background, label or button, in a second window (activated by a button in the root window)?
@ricardodagnonihuelsmann3379
@ricardodagnonihuelsmann3379 4 жыл бұрын
Actually watching the video, "Create New Windows in tKinter - Python Tkinter GUI Tutorial #14", I could see that it is necessary to declare the images as global...
@ricardodagnonihuelsmann3379
@ricardodagnonihuelsmann3379 4 жыл бұрын
​@@Codemycom Thank you again, your channel is enriching and very valuable!!!
@Codemycom
@Codemycom 4 жыл бұрын
@@ricardodagnonihuelsmann3379 Sure, basically the same way. Make your image variable global.
@nialyavuzturk2555
@nialyavuzturk2555 3 жыл бұрын
The code isn't working for me
@Codemycom
@Codemycom 3 жыл бұрын
Then you have a typo
@funnyclips2696
@funnyclips2696 2 жыл бұрын
Excellent
@Codemycom
@Codemycom 2 жыл бұрын
Thanks!
@keglobecommunity4805
@keglobecommunity4805 2 жыл бұрын
thank you so much
@Codemycom
@Codemycom 2 жыл бұрын
Welcome
@reyhaners
@reyhaners Жыл бұрын
Doesn't work for me :(
@Codemycom
@Codemycom Жыл бұрын
then you did it wrong
@shehab976
@shehab976 4 жыл бұрын
Sir,plz streamlit tutorials!!...they are much simpler...
@Codemycom
@Codemycom 4 жыл бұрын
Sorry, I don't know what that is...
@ariklevi
@ariklevi 3 жыл бұрын
I had a bunch of errors on pillow until I ran this to update the package.. and all errors were gone python3 -m pip install pillow==8.4.0 It appears that by default, pip will install pillow version 5.1.1... just need to update it to the latest
@Codemycom
@Codemycom 3 жыл бұрын
good tip!
@kaisj7
@kaisj7 Жыл бұрын
Thank U
@Codemycom
@Codemycom Жыл бұрын
welcome
@brunorcabral
@brunorcabral 3 жыл бұрын
canvas_bg = my_canvas.create_image(...) ... def resizer(e): ... my_canvas.itemconfig(canvas_bg, image=new_bg)
@hiwab41
@hiwab41 4 жыл бұрын
First
@Codemycom
@Codemycom 4 жыл бұрын
Nice!
Using Entry Boxes On Canvas - Python Tkinter GUI Tutorial #149
16:36
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
Using images in tkinter [ including how to scale them ]
31:57
Simple Machine Learning GUI App with Taipy and Tensorflow
30:52
Python Simplified
Рет қаралды 176 М.
OpenCV Python Tutorial 1: Read, Display, Resize, and Save Images
15:16
Aleksandar Haber PhD
Рет қаралды 357
Adding a Full Screen ScrollBar - Python Tkinter GUI Tutorial #96
15:08
Treeview - Python Tkinter GUI Tutorial #116
20:21
Codemy.com
Рет қаралды 142 М.
Fix Tkinter Images Not Showing in Python | Tkinter GUI Images Not Displayed in Label
8:02
Fabio Musanni - Programming Channel
Рет қаралды 10 М.
Some tricks with UV and a new Python project: uvtrick!
11:45
CalmCode
Рет қаралды 10 М.