Skip to content

Instantly share code, notes, and snippets.

@geojeff
Created July 5, 2012 09:37
Show Gist options
  • Save geojeff/3052621 to your computer and use it in GitHub Desktop.
Save geojeff/3052621 to your computer and use it in GitHub Desktop.
import kivy
kivy.require('1.0.7')
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.boxlayout import BoxLayout
class LabelWithBackground(Label):
background_color = [1., 0., 0., 1]
class LabelTest(App):
def build(self):
box_layout = BoxLayout()
label_with_background = LabelWithBackground(text='Kivy rulz', font_size=98, pos=(400, 328), background_color=[1., 0., 1., 1])
box_layout.add_widget(label_with_background)
return box_layout
if __name__ in ('__main__', '__android__'):
LabelTest().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment