python - Kivy button (relative layout) no text on it -


so noob code , problem - there no text on buttons in . why? if add label text still not displayed. in carousel class text added normally... 1 workaround found add label on top of button (but don't idea)

from kivy.lang import builder kivy.uix.boxlayout import boxlayout kivy.uix.relativelayout import relativelayout kivy.app import app kivy.uix.carousel import carousel  builder.load_string('''  <mainclass>:     boxlayout:         pos_hint: {"x": 0, "y": .85}         button:             text: "saasas"             on_press: root.next()         button:             text: "saasas"         button:             text: "prev"             on_press: root.prev()  <carousel>:     size_hint: 1, .6     boxlayout:         button:             text: "asas"         button:         button:     gridlayout:         cols:2         button:         button:         button:         button:  ''')  class add(boxlayout):     pass  class mainclass(relativelayout):     def __init__(self):         relativelayout.__init__(self)         self.car = carousel()         self.add_widget(self.car)       def next(self, *args):         print('next')      def prev(self, *args):         pass  class test(app):     def build(self):         return mainclass() test().run() 

i have no idea why happen ...

edit: here actual of window: http://i58.tinypic.com/2yytdua.png


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -