Skip to content

Instantly share code, notes, and snippets.

@Alan-FGR
Created August 14, 2015 19:30
Show Gist options
  • Save Alan-FGR/bc1eacbf5a66ce53c854 to your computer and use it in GitHub Desktop.
Save Alan-FGR/bc1eacbf5a66ce53c854 to your computer and use it in GitHub Desktop.
One more kivy problem
from kivy.uix.label import Label
from kivy.uix.image import Image
from kivy.uix.stacklayout import StackLayout
from kivy.app import Builder, App
class MyApp(App):
def build(self):
lay1 = StackLayout(size_hint_y=None)
lay1.bind(minimum_height = lay1.setter("height"))
lay1.padding = 16 #depending on the number here, img ends up on top of lbl. 15 works
img = Image(size_hint=(0.9,None))
lay1.add_widget(img)
lbl = Label(size_hint=(0.1,None),text="test")
lay1.add_widget(lbl)
return lay1
MyApp().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment