Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement ScrollView in Python/Kivy

Tags:

python

kivy

I have made some code to display some content in Python/Kivy, and it seems I didnt write the ScrollView good.

I have tried some variations in the program but the program doesnt display the scrollbar.

This is my code:

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

My question is: what I need to do to display scroolbar???

Thanks

like image 480
depecheSoul Avatar asked Sep 04 '12 17:09

depecheSoul


1 Answers

I found an example on https://groups.google.com/forum/?fromgroups=#!topic/kivy-users/AiaUnKp3XX4 and the mistake has been corrected.

I forgot to set bind method

like image 93
depecheSoul Avatar answered Sep 28 '22 07:09

depecheSoul