scrollview - Single word per line in kivy(GridLayout) -
i'm trying make app similar menu. did scrollview gridlayout, don't know how show separate, instance, in left column names, , in right column age, in way app may have variable number of rows (infinity). hope have been less confusing possible, same english. everybody, didn't post code here because think isn't necessary. bye, have day.
ass important post code here, i'm going try post. i'm sorry mistakes indent. .py class primeiroscreen(screen): def __init__(self, **kwargs): self.name = 'home' super(screen,self).__init__(**kwargs) class segundoscreen(screen): text = stringproperty('') def __init__(self, **kwargs): self.name = 'dois' super(screen,self).__init__(**kwargs) class rootscreen(screenmanager): pass class scrollmanageapp(app): def build(self): return rootscreen() if __name__ == '__main__': appvar = scrollmanageapp() scrollmanageapp().run()
.kv
<rootscreen>: primeiroscreen: segundoscreen: <primeiroscreen>: boxlayout: size_hint: (.3,.15) pos_hint:{'x': .35, 'y': .84} label: text: "teste de uniĆ£o scrollview com screenmanage" font_size: '30dp' gridlayout: cols: 1 rows: 2 size_hint: (.20,.10) pos_hint:{'x': .25, 'y': .64} button: text: "scrollview!" font_size: '30dp' text_size: self.size on_press: root.manager.current = 'dois' <segundoscreen>: text: 'this test ' * 50 scrollview: size_hint: 1, 1 pos_hint:{'x': .0, 'y': .0} size: 100, 100 gridlayout: cols: 2 #rows: padding: 10 spacing: 10 size_hint: none, none width: 500 height: self.minimum_height label: text: root.text font_size: 50 text_size: self.width, none size_hint_y: none height: self.texture_size[1] button: text: "voltar!" size_hint: .1, .1 pos_hint:{'x': .9, 'y': .0} text_size: self.width, none on_press: root.manager.current = 'home'
i hope had sucess in time(post code).very thanks!
Comments
Post a Comment