Created
August 14, 2015 19:30
-
-
Save Alan-FGR/bc1eacbf5a66ce53c854 to your computer and use it in GitHub Desktop.
One more kivy problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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