scrollview example without kv file

Showing 1-2 of 2 messages
scrollview example without kv file Rodrigo Liberal 7/11/12 4:02 PM
I was trying to implement the scrollview example without the kv file but I am finding it difficult.
Do you have a version like that?
Re: scrollview example without kv file qua-non 7/26/12 6:33 AM

from import App
from kivy.uix.scrollview import ScrollView
from kivy.uix.gridlayout import GridLayout
from kivy.uix.label import Label

class SMApp(App):

    def build(self):
        layout = GridLayout(cols=1, spacing=10, size_hint_y=None)
        #Make sure the height is such that there is something to scroll.
        for i in range(30):
            btn = Label(text=str(i), size_hint_y=None, height=40)
        root = ScrollView(size_hint=(None, None), size=(400, 400),
            pos_hint={'center_x':.5, 'center_y':.5})
        return root

if __name__ == '__main__':
This is actually taken from the documentation,
I'm curious what part were you having difficulty with?