I'm having problems in my Python application with Kivy library. In particular I'm trying to create a scrollable list of elements in a TabbedPanelItem, but I don't know why my list doesn't scroll.
Here is my kv file:
#:import sm kivy.uix.screenmanager
ScreenManagement:transition: sm.FadeTransition()SecondScreen:<SecondScreen>:tabba: tabbaname: 'second'FloatLayout:background_color: (255, 255, 255, 1.0)BoxLayout:orientation: 'vertical'size_hint: 1, 0.10pos_hint: {'top': 1.0}canvas:Color:rgba: (0.98, 0.4, 0, 1.0)Rectangle:pos: self.possize: self.sizeLabel:text: 'MyApp'font_size: 30size: self.texture_sizeBoxLayout:orientation: 'vertical'size_hint: 1, 0.90Tabba:id: tabbaBoxLayout:orientation: 'vertical'size_hint: 1, 0.10pos_hint: {'bottom': 1.0}Button:background_color: (80, 1, 0, 1.0)text: 'Do nop'font_size: 25<Tabba>:do_default_tab: Falsebackground_color: (255, 255, 255, 1.0)TabbedPanelItem:text: 'First_Tab'Tabs:TabbedPanelItem:text: 'Second_Tab'Tabs:TabbedPanelItem:text: 'Third_Tab'Tabs:<Tabs>:grid: gridScrollView:scroll_timeout: 250scroll_distance: 20do_scroll_y: Truedo_scroll_x: FalseGridLayout:id: gridcols: 1spacing: 10padding: 10Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)Label:text:'scroll'color: (0, 0, 0, 1.0)
And here my .py code:
__author__ = 'drakenden'__version__ = '0.1'import kivy
kivy.require('1.9.0') # replace with your current kivy version !from kivy.app import App
from kivy.lang import Builder
from kivy.uix.screenmanager import ScreenManager, Screen, FadeTransition
from kivy.properties import StringProperty, ObjectProperty,NumericProperty
from kivy.uix.tabbedpanel import TabbedPanel
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.utils import platform
from kivy.uix.gridlayout import GridLayout
from kivy.uix.label import Label
from kivy.uix.scrollview import ScrollViewclass Tabs(ScrollView):def __init__(self, **kwargs):super(Tabs, self).__init__(**kwargs)class Tabba(TabbedPanel):passclass SecondScreen(Screen):passclass ScreenManagement(ScreenManager):passpresentation = Builder.load_file("layout2.kv")class MyApp(App):def build(self):return presentationMyApp().run()
Where/What am I doing wrong?
(Comments and suggests for UI improvements are also accepted)