如何将ListItemLabel放入ListProperty

时间:2017-07-26 12:04:38

标签: python kivy

ListItemLabel只接受字符串。我想在列表中给它多个元素,我在ListItemLabel前面的str中使用它,但它没有做任何事情。

的Python:

result_true = ListProperty([])

extra = self.viewedit.adapter.data 

for edit in extra: 
    if edit['active'] == True:

        app.result_true.append(edit['text'])
        #app.result_true = (edit['text'])
        print app.result_true 

Kivy:

ListItemLabel:
   text:str(ctx.edit)

返回:

  

[' \ xce \ xbb \ xce \ xb9 \ xce \ xb1 \ xcf \ x83 \ xcf \ x84 \ xce \ xae \ xce \ xbd \ xcf \ x84 \ xce \ xbf \ xce \ xbc \ xce \ xac \ xcf \ x84 \ xce \ xb1',' \ xcf \ x83 \ xce \ xbf \ xcf \ x85 \ xcf \ x83 \ xce \ xac \ xce \ xbc \ xce \ xb9', ' \ XCF \ X84 \ XCF \ X85 \ XCF \ X81 \ XCE \ XAF']

0 个答案:

没有答案