The XKivy Github package : Brief Overview

29 Views Asked by At

I'm trying to use the xkivy Python module to do change XScrollBoxLayout padding using the _container. I'm having trouble with changing it ,it says "XScrollBoxLayout object has no attribute '_container' " Can anyone help?

I installed it on pypi using pip install xkivy

import kivy
from kivymd.app import MDApp
from xkivy.uix.scrollview import XScrollBoxLayout
from xkivy.uix.layouts import XBoxLayout
from xkivy.properties import ListProperty
from kivy.metrics import dp

class Main(XBoxLayout):
   xradius = ListProperty([10]*4)
   xbg_color = ListProperty([1,0,0,1])

   def add_widgets(self):
      self.scroll_layout = XScrollBoxLayout(orientation='vertical')
      self.add_widget(self.sroll_layout)

   def on_parent(self ,*args):
      self.add_widgets()

class MainApp(MDApp):
   def build(self):
      return Main()

MainApp().run()

I tried changing the padding by changing XScrollBoxLayout.padding but no change so im trying to use the container of XScrollBoxLayout ,that is XBoxLayout.

0

There are 0 best solutions below