Arbaz khan
Arbaz khan

Reputation: 11

Making project in kivy and python

How to create a button to save image. Any other button to set wallpaper.

I am new in kivy not in Python.

Upvotes: 1

Views: 98

Answers (1)

Federico Baù
Federico Baù

Reputation: 7646

How to create button using image in Kivy

import kivy           

kivy.require("1.9.1")  
from kivy.app import App          
from kivy.uix.button import Button
kivy.require('1.9.0')            
from kivy.config import Config  
      
Config.set('graphics', 'resizable', True)           

class ButtonApp(App):  
         
    def build(self):  
   
        btn = Button(text ="Push Me !", 
                     color =(1, 0, .65, 1), 
                     background_normal = 'normal.png', 
                     background_down ='down.png', 
                     size_hint = (.3, .3), 
                     pos_hint = {"x":0.35, "y":0.3} 
                   )  
      
        return btn  
             

root = ButtonApp()          

root.run()

Documentation

Upvotes: 1

Related Questions