我已经制作了一些代码来显示Python / Kivy中的一些内容,似乎我没有写好ScrollView。
我在程序中尝试了一些变化,但程序没有显示滚动条。
这是我的代码:
def build(self):
root = BoxLayout(orientation='vertical')
box = BoxLayout(orientation='vertical')
lists = rss_feed()
for lista in lists:
temp = BoxLayout(orientation='vertical')
for entry in lista:
temp.add_widget(Label(text=entry))
box.add_widget(temp)
sv = ScrollView(size_hint=(True, True), size=(400, 400))
root.add_widget(sv)
sv.add_widget(box)
return root
我的问题是:我需要做些什么才能显示scroolbar ???
由于
答案 0 :(得分:5)
我在https://groups.google.com/forum/?fromgroups=#!topic/kivy-users/AiaUnKp3XX4上找到了一个例子,错误已得到纠正。
我忘了设置绑定方法