Image Buttons And Rounded Buttons - Python Tkinter GUI Tutorial #66

  Рет қаралды 132,316

Codemy.com

Codemy.com

Күн бұрын

Пікірлер: 265
@garrybeck216
@garrybeck216 4 жыл бұрын
John, thanks for this series. very informative and easy to follow.
@Codemycom
@Codemycom 4 жыл бұрын
Very welcome!
@marckhycs319
@marckhycs319 4 жыл бұрын
This series helps me a lot on building my own projects. Thanks!!!
@Codemycom
@Codemycom 4 жыл бұрын
Great to hear!
@nowybopes
@nowybopes 4 жыл бұрын
If you need to do this on a background with a different color: 1. set button bg to color of the background (ex. bg="ffffff") 2. set button bg when it's clicked to color of the background (ex. activebackground="ffffff")
@jdsguam
@jdsguam 3 жыл бұрын
Answered my next question right out of the gate! Thanks.
@katmanduYT
@katmanduYT 3 жыл бұрын
what if we use a background image
@nowybopes
@nowybopes 3 жыл бұрын
​@@katmanduYT I don't think you can do anything about it in Tkinter
@katmanduYT
@katmanduYT 3 жыл бұрын
@@nowybopes okay :) thanks for the help tho
@LucasSideris
@LucasSideris 2 жыл бұрын
@@katmanduYT you can "cut" the an entire square block containing the button and background where it touches like a common internet image stripes process, and put the button bg as close as you can get from background part. It could be seamless depending on resolution and images used. @ubant Thank you so much, man!
@akramelomrani8728
@akramelomrani8728 4 жыл бұрын
I am watching this series and I see that you started kivy When I finish tkinter I will Imediatly start kivy thank you for your tutorials I have watched most of them the flask series taught me how to push to heroku And I use it from then thank you sir
@Codemycom
@Codemycom 4 жыл бұрын
Have fun!
@IRONMAN36554
@IRONMAN36554 3 жыл бұрын
YOUR AWESOME I WATCH MANY KZbin VIDEOS ABOUT PYTHON BUT POSSIBLE TO UNDERSTAND TODAY I FOUND THIS CHANNEL REALLY HELPUFLLY I UNDERSTOOD EVERYTHING
@Codemycom
@Codemycom 3 жыл бұрын
Great to hear!
@amirmohammadk745
@amirmohammadk745 3 жыл бұрын
best python teacher #1
@elysonpanolino7522
@elysonpanolino7522 2 жыл бұрын
Is there any way so that I can't click on the removed background?
@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
@khyatiparikh2929
@khyatiparikh2929 3 жыл бұрын
its exactly what i wanted.... thanks codemy
@Codemycom
@Codemycom 3 жыл бұрын
Glad you liked it!
@katrinastewart3765
@katrinastewart3765 3 жыл бұрын
thanks so much I'm completely new to all this and I already have buttons coded using classes for my separate windows and was wondering how to fit this code into it, as I want to use images as buttons ?
@alexindustries1672
@alexindustries1672 3 жыл бұрын
borderwidth doesn't work on mac can someone tell me how to fix that and also is there a way to display text on top of button image?
@david0411
@david0411 2 жыл бұрын
Did you find any solution to this?
@m.t-thoughts8919
@m.t-thoughts8919 4 жыл бұрын
Could you pls make a deeper video about tkinter notebook tabs? I would love to add buttons to the name area of a tap but I don't know how to do that. I want a similar adding and closing method as the Atom Text Editor has for it's taps. I hope you getting what I mean. This was also a really helpfull video. 😊
@stellaschmucker3059
@stellaschmucker3059 Жыл бұрын
Love your video!!❤
@Codemycom
@Codemycom Жыл бұрын
Thanks!
@brandonhagopian7165
@brandonhagopian7165 3 жыл бұрын
Thank You so much for your effort John!
@Codemycom
@Codemycom 3 жыл бұрын
Thanks for watching!
@abhasoli2655
@abhasoli2655 4 жыл бұрын
Can you make a video on the ttk module widgets?
@Codemycom
@Codemycom 4 жыл бұрын
I have several in the playlist already
@quinnfly1708
@quinnfly1708 7 ай бұрын
how would i get rid of the white space around the button tho? i wanted to use a circle png with a background but the white part of the buttons still shows in the background, how do i make it so that it is strictly the png file?
@alepuglisi5780
@alepuglisi5780 4 жыл бұрын
John, I love this series! I've a problem with the button images, I use your image and even if my code is correct and I set the borderwidth at 0 I still continue to see the borders of button and it doesn't move... It can be because I'm using macOS?
@shaktisinhjhala5758
@shaktisinhjhala5758 4 жыл бұрын
hey, try to add.. highlightthickness=0 along with borderwidth=0 ..it will solve your problem.
@hillybankok
@hillybankok 3 жыл бұрын
@GoldenD60 true
@thitismit
@thitismit 2 жыл бұрын
And if I want to get string from API and put it on rounded button with image, What must I do?
@LearnwithAnsh
@LearnwithAnsh 3 жыл бұрын
8:28 I smashed the like button but my computer screen broke lol 😂
@Codemycom
@Codemycom 3 жыл бұрын
ha!
@codeKeshav
@codeKeshav 4 жыл бұрын
Using bind function in that image label can work as button too..
@ZAYN_ONE_DIRECTION
@ZAYN_ONE_DIRECTION 2 жыл бұрын
does this work on a canvas?
@yashmehta4799
@yashmehta4799 4 жыл бұрын
Thanks a ton for this video. Sir, could you make a video on gtts module and how can we use it in our tkinter code??
@Codemycom
@Codemycom 4 жыл бұрын
I don't know gtts, but it would be interesting
@soham7226
@soham7226 4 жыл бұрын
can I change the image of the button when hovering the mouse cursor?
@Codemycom
@Codemycom 4 жыл бұрын
Sure
@soham7226
@soham7226 4 жыл бұрын
@@Codemycom how??
@Codemycom
@Codemycom 4 жыл бұрын
@@soham7226 I have a video on that in the playlist
@anuragthakur5787
@anuragthakur5787 3 жыл бұрын
Thank you very much because of you I was able to make my first project :)
@Codemycom
@Codemycom 3 жыл бұрын
Happy to hear it!
@amirmohammadk745
@amirmohammadk745 3 жыл бұрын
wait why you dont use cntrl + b in sublime
@sherzodabdumutalibov1384
@sherzodabdumutalibov1384 2 жыл бұрын
thank you man! Спасибо брат, помог. Удачи тебе!
@johnemanuelalamares2206
@johnemanuelalamares2206 4 жыл бұрын
How to make it rounded when I have an image as my background? because the background of the button is still there
@ShekhMukhtarMansuri
@ShekhMukhtarMansuri 4 жыл бұрын
edit background image in rounded shop in photoshop itself.. then import in python...
@EthioWonder
@EthioWonder 3 жыл бұрын
You are the one you make me programmerr
@psirohi7199
@psirohi7199 4 жыл бұрын
Hi! Thanks for video, but I have an query. Can we use 3d graphics with tkinter?
@Codemycom
@Codemycom 4 жыл бұрын
Not sure what you mean by 3d
@katrinastewart3765
@katrinastewart3765 3 жыл бұрын
very informative I'm new to coding all together. just one thing I struggled with here was adjusting the button sizes ? thank you!
@Codemycom
@Codemycom 3 жыл бұрын
Glad it helped!
@dimitriosdesmos4699
@dimitriosdesmos4699 4 жыл бұрын
thanks for that, i needed it.
@Codemycom
@Codemycom 4 жыл бұрын
Glad I could help
@dimitriosdesmos4699
@dimitriosdesmos4699 4 жыл бұрын
there are some libraries that allow you to design the tkinter layout in a manner similar to the qt5 toolkit.....like a design interface with drag and drop buttons..etc etc..any chance you can review those in the future?
@Codemycom
@Codemycom 4 жыл бұрын
could be
@matesss16
@matesss16 Жыл бұрын
I want to make button from transparent image and after that write some text on it (so the button looks like text). Is it some way how to do it?
@Codemycom
@Codemycom Жыл бұрын
Use photoshop
@matesss16
@matesss16 Жыл бұрын
@@Codemycom Thanks for response, but I have cca 40 buttons, so isn't there easier way 😅
@hello-my6ot
@hello-my6ot 4 жыл бұрын
Hello john I did the same thing and it worked but it doesnt show my image as transparent but it was a transparent image. Do you know how to solve this?
@rubenmata73
@rubenmata73 4 жыл бұрын
Just GREAT!!!! THANKS!
@Codemycom
@Codemycom 4 жыл бұрын
Glad you liked it!
@sameehazahid466
@sameehazahid466 Жыл бұрын
whenever I try to use an image it say 'no such file or directory'. I have saved all the files I'm using to the same place which is the desktop. It works when opening programs but not images. Any way to fix this?
@Codemycom
@Codemycom Жыл бұрын
You're getting that error because you aren't using the correct path to open the images.
@הדרתורגמן-ח8ו
@הדרתורגמן-ח8ו 3 жыл бұрын
hello! what can I do if I can't see the image on the screen? it looks like a grey square... Thank you for your useful videos!
@Codemycom
@Codemycom 3 жыл бұрын
What did you do differently than the video?
@__noel_abraham__
@__noel_abraham__ 2 жыл бұрын
Thank you, actually i am searching for this
@Codemycom
@Codemycom 2 жыл бұрын
happy to hear it
@darkjunior2162
@darkjunior2162 4 жыл бұрын
Merci beaucoup pour cette vidéo 😄 Thank you very much for this video
@Codemycom
@Codemycom 4 жыл бұрын
You're very welcome!
@sepehr2371
@sepehr2371 4 жыл бұрын
Great video, my problem with this is that if I was to click on somewhere a little outside of the login button, would it still get activated as the image itself is a square so the "hitbox" would be larger than the rounded button alone?
@Codemycom
@Codemycom 4 жыл бұрын
depends on the image you use
@sepehr2371
@sepehr2371 4 жыл бұрын
@@Codemycom yeah also I figured that buttons for some reason dont allow transparency if you change the background colour to not white you will notice. I tried using root.wm_attributes("-transparentcolor", "somecolor") to sort of green screen the background of it but it resulted in a weird box that is see-through in the window.
@nayanendusanthosh2053
@nayanendusanthosh2053 4 жыл бұрын
Can we add multiple buttons ?Please reply..As in after we click one button the next input button appears..
@Codemycom
@Codemycom 4 жыл бұрын
Why not?
@sepehr2371
@sepehr2371 4 жыл бұрын
yeah you can just somewhere in the button command function pack the next button and it should show up.
@liamgaeuman4990
@liamgaeuman4990 4 жыл бұрын
Hey John, I'm trying to make a card game in tkinter but I can't figure out how to select an image drag it and place it and then select a different image and do the same thing. I've decided to try turning my images into buttons and defining the selected image for dragging that way. Can you make a video on how to drag and drop multiple separate items? In your drag and drop video the image will just snap back to wherever you click on the screen which isn't what you want if you are going to select another item to drag.
@kylebrooks8162
@kylebrooks8162 4 жыл бұрын
I'd probably use pygame for that not tkinter.
@liamgaeuman4990
@liamgaeuman4990 4 жыл бұрын
@@kylebrooks8162 I tried that too lol. It’s quite the process as well.
@RafaelMartinez-si2hm
@RafaelMartinez-si2hm 3 жыл бұрын
On Linux when I hover over my button it gets highlighted with a white color. Is there a way to change this?
@Codemycom
@Codemycom 3 жыл бұрын
No idea
@RyanDanielG
@RyanDanielG 3 жыл бұрын
feed the algorithm! great vid
@furkank5614
@furkank5614 4 жыл бұрын
All i have is white screen after 6:07. why is that ?
@Codemycom
@Codemycom 4 жыл бұрын
You have a typo in your code somewhere
@2527donni
@2527donni 4 жыл бұрын
Is there a way to save the last used state of buttons clicked , slider positions etc to a file in tkinter? I can't find a way to make a backup of buttons pressed , sliders set , and then load it back into tkinter , some feature akin to the preferences/last used settings in software is what I'm looking for. Does Tk provides for this? . Awesome content you got John , I've smashed the like button :)
@Codemycom
@Codemycom 4 жыл бұрын
Just assign whatever you want into a variable...then you can access it any way you want, whenever you want. Unless you mean like after the program has closed? Then you could save those things to a file in the normal python way...
@joeldsouza2690
@joeldsouza2690 4 жыл бұрын
Is there any attribute by which I could change the dimension of the image
@Codemycom
@Codemycom 4 жыл бұрын
No, you need to actually resize the image with pil...I have a video on it.
@JustAnotherCoder
@JustAnotherCoder 3 жыл бұрын
This is great thanks! The only problem is that it gives me this error "self.tk.call(('image', 'create', imgtype, name,) + options) _tkinter.TclError: couldn't recognize data in image file "images/inbox.png" when I try to run it using the code you showed us.
@Codemycom
@Codemycom 3 жыл бұрын
is the file you're using an actual png file?
@JustAnotherCoder
@JustAnotherCoder 3 жыл бұрын
@@Codemycom oh nevermind yeah that was the problem, I converted it to png and now when I run my program I just see 2 lines in the middle and no errors
@datneanimation2336
@datneanimation2336 3 жыл бұрын
Can I put Image on Button when button is lying on Frame ? I can't do it. Help me. pls. Thanks
@Codemycom
@Codemycom 3 жыл бұрын
Yes, in the exact same way
@datneanimation2336
@datneanimation2336 3 жыл бұрын
​@@Codemycom Thanks. Can i add my images on Treeview ? I searched your youtube channel but I couldn't see it :((
@sevilnatas
@sevilnatas 4 жыл бұрын
For the life of me, I can't get the image to show up in even the simplest stage of your tutorial. The stage where you put the image in the label. Program runs but the window comes up with a blank window. Tkinter is kicking my ass for what seems basic, stupi reasons. I spent 2 days trying to get PIL and Pillow to work which is what lead me hear. All I want is an image button and even copying your code character by character (except for the image paths) I can't get anything to show up. I read somewhere that PhotoImage doesn't support PNGs and JPGs, but yours works fine. Also, mine won't allow me to use 'pady=20' in the pack method. There is something different between my tkinter and yours. I am on WIN 10 (64bit) in VS Code. Could that be the reason?
@sevilnatas
@sevilnatas 4 жыл бұрын
Wait, why is my 'pack' method making me capitalize 'Pack' but yours isn't? What version Python is your tutorial in?
@Codemycom
@Codemycom 4 жыл бұрын
@@sevilnatas it's because VS code sucks. I use sublime text (free) and git bash terminal (free) git-scm.com and vs code doesn't "make" you capitalize it, it autocorrects. You can change it.
@sevilnatas
@sevilnatas 4 жыл бұрын
@@Codemycom Thanks for the feedback. I will try sublime and git bash terminal then. Any thoughts on the other parts of my comment. It seems bizarre that I can't even get the simplest example to run. I know debugging someones code is hard enough let alone when they ask you to do it without being able to see it but just wondering if you had any ideas off the top of your head where I shoul dgo to next? Thanks again....
@Codemycom
@Codemycom 4 жыл бұрын
@@sevilnatas I couldn’t say...but using the other tools may clear up your other problems.
@sevilnatas
@sevilnatas 4 жыл бұрын
@@Codemycom Oki doke, I'll try it, thanks...
@kingvg9567
@kingvg9567 2 жыл бұрын
i tried it and saved the picutre i wanted to use in the same folder. When i try to run the code it says "pyimage1" doesn't exist. pls help!
@Codemycom
@Codemycom 2 жыл бұрын
what did you do differently from the video?
@proxnoob2
@proxnoob2 2 жыл бұрын
thank you everything worked for me except borderwidth, when I am giving borderwidth it is showing this error _tkinter.tclerror: unknown option "-borderwidth", do you know how to solve it
@Codemycom
@Codemycom 2 жыл бұрын
use bd=
@castropaulo5467
@castropaulo5467 2 жыл бұрын
hi i am beginner, it is related to your video the images buttons can't show after run the code can you help me? i already located the images in folder but still can't show you can solve?
@JohnElder
@JohnElder 2 жыл бұрын
You'll have to rewatch the video and figure out what you did differently
@castropaulo5467
@castropaulo5467 2 жыл бұрын
@@JohnElder the images can't show can you help me? i followed your instruction
@Codemycom
@Codemycom 2 жыл бұрын
@@castropaulo5467 You'll have to rewatch the video and figure out what you did differently, you did not follow the instructions
@shivanshukamboj7940
@shivanshukamboj7940 3 жыл бұрын
It doesn't work when image is in background .....a square button shape appears on the back
@Wuottfac
@Wuottfac 4 жыл бұрын
Hello, Is possible in tkinter when a button clicked print a text in textarea and also clear it with another button?? Pls help me
@Codemycom
@Codemycom 4 жыл бұрын
Sure, just keep watching videos in the playlist to learn this basic functionality.
@gbg6750
@gbg6750 4 жыл бұрын
The problem is when we have a backgound image on label, then we still have the square chape at the button, is there some how to fix it?
@Codemycom
@Codemycom 4 жыл бұрын
yes...don't I show you how to set the borderwidth=0 on the button? If not in this video, I know I do somewhere on the playlist..
@Stocktan1
@Stocktan1 4 жыл бұрын
@@Codemycom using borderwidth=0 doesn't fix it when you are using a different background :c help
@Codemycom
@Codemycom 4 жыл бұрын
@@Stocktan1 It should
@xtiankimochii7479
@xtiankimochii7479 4 жыл бұрын
It relly helps me . Thank u so much btw i why it is not working it say that image"pyimage8" doesn't exist but i all ready do it
@asmerbay8200
@asmerbay8200 4 жыл бұрын
Thanks for this wonderful courses John.Could you make more videos about classes in Tkinter?
@Codemycom
@Codemycom 4 жыл бұрын
Sure
@datimo5029
@datimo5029 2 жыл бұрын
So Insert image and your button is "rounded" but how to actually round the button (without inserting image)
@Codemycom
@Codemycom 2 жыл бұрын
You don't
@ryce_jnes
@ryce_jnes 4 жыл бұрын
you the best in python
@Codemycom
@Codemycom 4 жыл бұрын
Thanks!
@isaacphiri8301
@isaacphiri8301 4 жыл бұрын
An trying but am failing its saying that no such file or directory so what should I do
@Codemycom
@Codemycom 4 жыл бұрын
three's a typo likely in your code.
@huntermccauley4583
@huntermccauley4583 4 жыл бұрын
My buttons will not display any image, only blank grey squares. Could it be because I'm using macOS? I've noticed it can be very restrictive with tkinter.
@Codemycom
@Codemycom 4 жыл бұрын
Could be, but shouldn't... check your image paths...
@huntermccauley4583
@huntermccauley4583 4 жыл бұрын
@@Codemycom Image paths are correct. Interestingly, if I simply add the line create_image(image = 'my image') after I pack my button, then the image appears on the button as it should. But I don't believe this is the correct usage.
@huntermccauley4583
@huntermccauley4583 4 жыл бұрын
I forgot to add, any code after create_image(image = 'my image') will not show in the GUI, obviously not the correct usage lol.
@Codemycom
@Codemycom 4 жыл бұрын
@@huntermccauley4583 Anything that works is the correct usage lol
@kundanjadhav8758
@kundanjadhav8758 4 жыл бұрын
why u use pack instend of place
@Codemycom
@Codemycom 4 жыл бұрын
Personal preference.
@kundanjadhav8758
@kundanjadhav8758 4 жыл бұрын
@@Codemycom do u have any video on grid, place, pack
@jazaaraian
@jazaaraian 3 жыл бұрын
Hello! I used this guide to add this to my code but somehow get an error "image "py2image" doesn't exist". How to fix this one? Any guides?
@Codemycom
@Codemycom 3 жыл бұрын
Is the image sitting on your computer in the directory that you're pointing to?
@jazaaraian
@jazaaraian 3 жыл бұрын
@@Codemycom Yes, I also double checks it
@jazaaraian
@jazaaraian 3 жыл бұрын
Is it possible to use it in one of the two tk window ? Or 1 has to be in Toplevel() ? It works when I do it on a new .py file.
@Codemycom
@Codemycom 3 жыл бұрын
@@jazaaraian Yes, you have have to make your image variable global to use it in a second window
@jazaaraian
@jazaaraian 3 жыл бұрын
@@Codemycom Thank you ! I will try this one. I apologize if I ask for help here even though it's not should be.
@maxblax9159
@maxblax9159 3 жыл бұрын
I just thank you for this
@Codemycom
@Codemycom 3 жыл бұрын
Glad you enjoyed it!
@rocketleagueshorts1961
@rocketleagueshorts1961 3 жыл бұрын
amazing video sir, but can you please tell how to get an image of that size ?
@Codemycom
@Codemycom 3 жыл бұрын
Sorry, I don't know what you mean.
@rocketleagueshorts1961
@rocketleagueshorts1961 3 жыл бұрын
@@Codemycom i watched your video on how to do a calculator. in that calculator app instead of having normal buttons i planned to have images of 1,2,3.. as button but i didnt get images for 1,2.. with a size which is equal to actual tkinter button size. so do you know any website where i can download an image where the size of images is small that we can use it for our projects ?
@Codemycom
@Codemycom 3 жыл бұрын
@@rocketleagueshorts1961 I mean, google it there are millions of image websites. Or just resize the images yourself using photo editing software. gimp is free or there are tons of free image editing website. Google image editing
@rocketleagueshorts1961
@rocketleagueshorts1961 3 жыл бұрын
@@Codemycom thx a lot
@leothomas1113
@leothomas1113 3 жыл бұрын
select_img = PhotoImage(file="/select2.png") select=Label(image=select_img) b = Button(frame, image=select_img, width=100, height=20, borderwidth=0, relief='raised', cursor='hand2', command=lambda roomno=r: book(roomno)) b.pack(anchor=E) this doesn't show any image on the button, nor does the button work. how to solve this ?
@Codemycom
@Codemycom 3 жыл бұрын
Your code is all wrong. Rewatch the videos.
@shraddha10827
@shraddha10827 3 жыл бұрын
Good job!!!
@Codemycom
@Codemycom 3 жыл бұрын
Thanks!!
@afnanardi27
@afnanardi27 4 жыл бұрын
what is the dimension of a button to use that in tkinter? like what would be the dimension if i want to make that in potoshop
@Codemycom
@Codemycom 4 жыл бұрын
A button is the size of the text you put on it...so there is no one size...
@martindubois9279
@martindubois9279 4 жыл бұрын
weird my code work on windows but not on my pi. i still see the border button on my pi
@Codemycom
@Codemycom 4 жыл бұрын
yeah, pi's are different than windows
@Shaffi003
@Shaffi003 4 жыл бұрын
Hi.. I'm a noob in python.. I am creating an app that process a csv file into some sort of configurations. I have a template csv file and i want to host in tkinter with button.. A csv file will get download once button clicked.. I looking for an idea.. Kindly help..
@Codemycom
@Codemycom 4 жыл бұрын
Sorry, I'm not going to write your app for you.
@nurizzahwanibintimartangbs2857
@nurizzahwanibintimartangbs2857 2 жыл бұрын
i want to use ttk.Button insteac the usual Button, but it said _tkinter.TclError: unknown option "-borderwidth"
@Codemycom
@Codemycom 2 жыл бұрын
yeah, ttk button doesn't have that attribute
@johnpro2847
@johnpro2847 4 жыл бұрын
1:15 John's lawyer makes him say this disclaimer...
@mujassimjamal24
@mujassimjamal24 4 жыл бұрын
Thank you so much sir 😊❤❤❤
@Codemycom
@Codemycom 4 жыл бұрын
You're very welcome!
@Vincent2103
@Vincent2103 6 ай бұрын
is the login picture in your github?
@Codemycom
@Codemycom 6 ай бұрын
probably, but use any image you like...there's a million free ones everywhere online
@Zhisaoka
@Zhisaoka 4 жыл бұрын
thank you so much, but for me when I change the borderwidth it wont work
@Codemycom
@Codemycom 4 жыл бұрын
You're welcome!
@shubhanshusharma5372
@shubhanshusharma5372 3 жыл бұрын
Pls help it showing error unknown option "-borderwidth"
@Codemycom
@Codemycom 3 жыл бұрын
did you put it in the right spot?
@shubhanshusharma5372
@shubhanshusharma5372 3 жыл бұрын
Thanks for reply here is line of code createacc=Button(root,image=newpicj,borderwidth=0)
@Codemycom
@Codemycom 3 жыл бұрын
@@shubhanshusharma5372 you also need to give it a relief="groove" or relief="sunken" or whatever
@shubhanshusharma5372
@shubhanshusharma5372 3 жыл бұрын
@@Codemycom unknown option "-relief"
@arunvijay6493
@arunvijay6493 2 жыл бұрын
big fan bro..
@Codemycom
@Codemycom 2 жыл бұрын
Thanks!
@phudinhtruong
@phudinhtruong 3 жыл бұрын
another great video . tks u alot
@Codemycom
@Codemycom 3 жыл бұрын
Glad you liked it!
@kaaaaasraa49563
@kaaaaasraa49563 4 жыл бұрын
Greetings John, Please make a video about concatenating image and text in labels
@Codemycom
@Codemycom 4 жыл бұрын
Good idea...all you have to do is use the compound attribute. compound=CENTER puts the text in the center, compound=LEFT puts it left, etc. Everything else stays the same. You can also compound top or bottom, center, left, right.
@kaaaaasraa49563
@kaaaaasraa49563 4 жыл бұрын
@@Codemycom Thanks 🙏
@shivanshukamboj7940
@shivanshukamboj7940 3 жыл бұрын
How to make that image make smaller in a button
@Codemycom
@Codemycom 3 жыл бұрын
resize it
@shivanshukamboj7940
@shivanshukamboj7940 3 жыл бұрын
@@Codemycom thanks a lot ......can you tell how to close all windows including main tkinter window from a sub-window without crossing each and every window eg : termination of an app
@Codemycom
@Codemycom 3 жыл бұрын
@@shivanshukamboj7940 sure, I think I have videos on that already on the playlist.
@shivanshukamboj7940
@shivanshukamboj7940 3 жыл бұрын
@@Codemycom Going to watch it right now.... Thanks a lot......master
@shivanshukamboj7940
@shivanshukamboj7940 3 жыл бұрын
@@Codemycom also can you help on how to solve pyimage doesn't exist when I am creating a tkinter window through calling a user defined function
@corruptedcookie8349
@corruptedcookie8349 2 жыл бұрын
What is icon bit map
@Codemycom
@Codemycom 2 жыл бұрын
The icon in the titlebar
@black-ym5di
@black-ym5di 4 жыл бұрын
hey john can tkinter be able to create UI like Jarvis?
@Codemycom
@Codemycom 4 жыл бұрын
Sorry, I'm not familiar with Jarvis
@seshrisanjanaa153
@seshrisanjanaa153 4 жыл бұрын
how to place back button?
@Codemycom
@Codemycom 4 жыл бұрын
Huh? In the normal way you put any button in a tkinter app
@hello-my6ot
@hello-my6ot 4 жыл бұрын
Thank you!
@Codemycom
@Codemycom 4 жыл бұрын
You're welcome!
@athiradivakaran2036
@athiradivakaran2036 4 жыл бұрын
Tried the same..i have a background image...so even borderwidth is zero it looks like a rectangle button
@Codemycom
@Codemycom 4 жыл бұрын
Then you're doing something wrong...check your code for typos
@JalalDictaJet
@JalalDictaJet Жыл бұрын
good work
@Codemycom
@Codemycom Жыл бұрын
Thanks!
@davidkeeper7292
@davidkeeper7292 2 жыл бұрын
Please not working on my Mac ,I used a transparent png
@Codemycom
@Codemycom 2 жыл бұрын
It should work on a mac
@david0411
@david0411 2 жыл бұрын
How did you fix it?
@deepikasinghj5486
@deepikasinghj5486 2 жыл бұрын
Tq It was a great help
@Codemycom
@Codemycom 2 жыл бұрын
Glad to hear it!
@oussamathedjfreeman
@oussamathedjfreeman 3 жыл бұрын
need corse about gui with animation buttons and video on it :)
@Codemycom
@Codemycom 3 жыл бұрын
check the playlist
@oz9985
@oz9985 2 жыл бұрын
for me it only shows a blank label
@Codemycom
@Codemycom 2 жыл бұрын
Then you did it wrong. Check your code vs the video and see where your mistake is.
@shaktisinhjhala5758
@shaktisinhjhala5758 4 жыл бұрын
If one is using Tkinter with python-OOPs than only "self.login_btn = PhotoImage(...)" will be sufficient. no need to store the image's reference in "Label" as a variable with 'self' will be considered as an instance variable, which will prevent garbage collector to destroy reference object.
@Codemycom
@Codemycom 4 жыл бұрын
Yeah but we aren't using classes here
@shaktisinhjhala5758
@shaktisinhjhala5758 4 жыл бұрын
@@Codemycom yup👍 jst shared a thought 😄. Anyways great tutorials 🔥😊
@Codemycom
@Codemycom 4 жыл бұрын
@@shaktisinhjhala5758 :-)
@digitalmachine0101
@digitalmachine0101 11 ай бұрын
Good information
@Codemycom
@Codemycom 11 ай бұрын
Thanks
@bernadethbautista-clomagul1291
@bernadethbautista-clomagul1291 3 жыл бұрын
How to insert image button on next window?
@Codemycom
@Codemycom 3 жыл бұрын
In the same way you add anything to another window. I have videos on that in the playlist.
@screensauce
@screensauce 3 жыл бұрын
Pls do a vid on how to make a neon text In tkinter
@Codemycom
@Codemycom 3 жыл бұрын
You'd have to use an image
@יש_המשיח
@יש_המשיח 10 ай бұрын
i had to capitalize Label and it worked
@Codemycom
@Codemycom 10 ай бұрын
Well yeah, Label is capitalized in the video. Code is always exact.
@noname99832
@noname99832 3 жыл бұрын
ttk Buttons are bit round from tkinter import * from tkinter import ttk root = Tk() Btn = ttk.Button(root, text="This looks a bit modern and its rounded") Btn.pack() root.mainloop() Note - You cannot change fg and bg of ttk.Button it have it's own style
@glazelucki
@glazelucki 4 жыл бұрын
You: put the image into the button Me: put the button into the image :|
@Codemycom
@Codemycom 4 жыл бұрын
But you're literally putting the image in the button...you aren't putting the button into the image.
@Cornievenzter
@Cornievenzter 4 жыл бұрын
If your background is dark or darker , a white block still appear when clicking on it
@Codemycom
@Codemycom 4 жыл бұрын
huh?
@Cornievenzter
@Cornievenzter 4 жыл бұрын
@@Codemycom huh?
@Gkwazy
@Gkwazy 4 жыл бұрын
@@Cornievenzter if I understand correctly, you have to then change the activebackground of the button to match the darker background of the application
@maxwellhawk
@maxwellhawk Жыл бұрын
i would like to see the one with themes ^^
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Using button functions with arguments in tkinter
8:04
Atlas
Рет қаралды 20 М.
Use a Drag & Drop Editor to Make Tkinter Python GUI Applications!
11:16
Create Stunning Python GUIs in 10 Minutes With Drag & Drop
11:38
Coding Is Fun
Рет қаралды 102 М.
Create Modern Buttons With Tkinter in Python | Tkinter GUI Button Design in Python
9:26
Fabio Musanni - Programming Channel
Рет қаралды 21 М.
Modern Graphical User Interfaces in Python
11:12
NeuralNine
Рет қаралды 1,6 МЛН
The Manim Experience - Creating animations with Python
38:51
Make Tkinter Look 10x Better in 5 Minutes (CustomTkinter)
4:40
TurbineThree
Рет қаралды 358 М.
Modern Buttons With Images - Python Tkinter GUI Tutorial 221
9:22
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН