I’m new to kivy and want to create a small app. Which will show different text (loaded from the database).
I tried to make a BoxLayout, but it is very difficult, especially since I then have to access the id in this element. I think I took a little wrong turn.
py code
import kivy
from kivy.uix.label import Label
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
class Container(BoxLayout):
def __init__(self, **kwargs):
super(Container, self).__init__(**kwargs)
w=BoxLayout()
self.ids.tr.add_widget(w)
class MyApp(App):
def build(self):
return Container()
if __name__ == '__main__':
MyApp().run()
kv code
<container>:
orientation:"vertical"
Label:
text: "Plan"
BoxLayout:
id:tr
Label
id: id1
text: "text1"
Label:
id: id2
text: "text2"
Label:
id: id3
text: "text3"
I would like something like this: [] 1