Archive

Archive for August 3rd, 2011

Kivy – Label with background

August 3rd, 2011 2 comments

Kivy is a framework for develop multitouch applications, I started to use pyMT, but pyMT evolved into Kivy.

Adding a background to a label is not possible using the common functions in documentation.

A possible solution by @Mathieu Virbel could be:

class MyLabelWithBackground(Label):
  pass
And put in a kv that you load somewhere:
<MyLabelWithBackground>:
  canvas.before:
    Color:
      rgb: 1, 0, 0 # your color here
    Rectangle:
      pos: self.pos
      size: self.size
Categories: kivy, multitouch, python Tags: , , ,