How To Use Images As Buttons in Kivy - Python Kivy GUI Tutorial #35

preview_player
Показать описание
In this video I'll show you how to use images for buttons in your Kivy App.

Chances are, you're going to want to use images as buttons in your app. It's pretty easy to do that, and I'll show you how in this video.

Just give your Button an Image, with a source pointing to the image. Then change the size of your button to fit the size of your image. Give your button an on_press and an on_release and you're good to go!
Рекомендации по теме
Комментарии
Автор

▶️ Watch Entire Kivy Playlist ✅ Subscribe To My YouTube Channel:
▶️ See More At: ✅ Join My Facebook Group:
▶️ Get The Code

Codemycom
Автор

You can use the button behavior on the image intead of putting an image over a invisible button

mirkoruhl
Автор

Thank you for these lessons on youtube, you are awesome !!! Now that I am up to date, I am resuming my courses on your site, which are also exceptional ;)

laurentreynaud
Автор

Nice. But how it is different from simply changing Button's properties "background_normal" and "background_down" instead? I normally use these properties. but is there a specific reason why not to use them? Is this extra code and effort worth it?

vinimaykaul
Автор

Please make a video for tap to speak button in search bar using kivy and python

aaa-vbfu
Автор

Thanks for your videos! Really helpful.
I have two questions.
1. Can you lock the aspect ratio when resizing a window?
2. I know that you can set window minimum width and height. But can you do the same for maximum width and height?

arsroma
Автор

thank you very much, your videos helped me a lot

thunderstruckx
Автор

thank u so much for this playlist and also tkinter :)
how about the sound and how to stop it for new event

glendydesabille
Автор

Thank you for having this amazing video

skyskyblue
Автор

thank you for the hard work u do for us

aronabhilash
Автор

I am making an app with many images. Is there a way to avoid making the pressed-version of all these images? Maybe by adding a transparent overlay

kaskilelr
Автор

thank you.. I like your you tube channel .. you are great teacher.. but I have problem after I write in pydtoid.. why?

athaliaprincess
Автор

The images I used are both 512 x 288 but they appear only about an inch wide on the button. Changing the `size_hint` on the button just makes the button bigger. A `size_hint` on the image doesn't do anything. I tried `allow_stretch = True` and it didn't work either. Otherwise everything is working.

unclebuddy
Автор

Is it possible to use other images as other widgets?

angelcruzie
Автор

Really helpful video, thanks!
But, is there a way to make the button fully invisible in any other way? since im gonna be using a Gradient background, making buttons's Background black wouldnt really work.

MrZeroinside
Автор

please upload videos fastly, can't wait anymore

nabeelshoukat
Автор

you could have just make a class and inherit from Image and ButtonBehavior

from kivy.uix.image import Image
from kivy.uix.behaviors import ButtonBehavior
class BtnImage(Image, ButtonBehavior):
pass

now you have an image with all the button behaviors

abdelrhmannile
Автор

Another way to exaggerate the button press is to move the button down 1 pixel on press, and then up 1 pixel on release.

problematicpunk
Автор

sir i need kivymd tutorials...i thinks they are much simpler than kivy

shehab
Автор

Hay kivy is not installing in my raspberry pi 4 ..?? WHY 😭

idk____idk
join shbcf.ru