How to add a background image to a button?

16 views
Skip to first unread message

UnhingedWazzak

unread,
Dec 31, 2018, 2:59:49 AM12/31/18
to Kivy users support
Hello World, I am new to kivy.... can anyone tell me how to add a background image to a button without using any external .kv file. Thank you for your help and support.

Elliot Garbus

unread,
Dec 31, 2018, 4:01:44 AM12/31/18
to Kivy users support
You can add an image to a button by changing the default image.
and background_disabled_normal.

Or you can add button behavior to an image, this may be a better fit depending on what you want to do.

I'd recommend you embrace KV.  It is very powerful and ultimately much easier.

ZenCODE

unread,
Jan 1, 2019, 12:53:34 AM1/1/19
to Kivy users support
p.s. You can also use kv without using an external kv file using the builder.load_string function....

UnhingedWazzak

unread,
Jan 1, 2019, 12:58:15 AM1/1/19
to Kivy users support
Thanks

UnhingedWazzak

unread,
Jan 1, 2019, 12:59:17 AM1/1/19
to Kivy users support
Thanks Elliot
Reply all
Reply to author
Forward
0 new messages