Skip to content

Instantly share code, notes, and snippets.

@Alan-FGR
Created August 1, 2015 02:04
Show Gist options
  • Save Alan-FGR/31561af2ececfefc12c3 to your computer and use it in GitHub Desktop.
Save Alan-FGR/31561af2ececfefc12c3 to your computer and use it in GitHub Desktop.
__author__ = 'Alan'
__version__ = '0.1'
import kivy
kivy.require("1.0.0")
from kivy.app import Builder
from kivy.app import App
from kivy.clock import Clock
mybutstr = """
#:import win kivy.core.window
Button:
size_hint: None,None
size: '65dp','35dp'
center_y: win.Window.height*0.5
center_x: win.Window.width*0.5
text: 'test'
"""
class MyApp(App):
def build(self, **kwargs):
self.mybut = Builder.load_string(mybutstr)
Clock.schedule_interval(self.resizeBut,0.1)
return self.mybut
def resizeBut(self, *args):
self.mybut.height = self.mybut.height+10
MyApp().run()
@Alan-FGR
Copy link
Author

Alan-FGR commented Aug 1, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment