我想在KV字符串中创建多行标签:
MDLabel:
text: '
MultilineText'
但是我收到这个错误:
text: '
8:
>> 9: MultilineText'
10:
11: pos_hint: {'center_x':.5,'center_y':.5}
…无效缩进,必须是4个空格的倍数我不能用三括号,因为我的代码已经在三括号里了:
'''
<Code>
size_hint_y: None
height: 60
FloatLayout:
MDLabel:
text: '
MultilineText'
pos_hint: {'center_x':.5,'center_y':.5}
'''
我想在一个标签多行长文本。帮助(
棘手的话题。试试这个:
'''
<Code>
size_hint_y: None
height: 60
FloatLayout:
MDLabel:
text: '\n' +
'\n' +
'MultilineText'
pos_hint: {'center_x':.5,'center_y':.5}
'''
我试过了,效果很好!MDLabel:标记:Truemultiline: Truefont_size:"12 sp"text: '[b][color=#007acc] Derived cst Bullet Rates (%) [/color][/b]'+'n' +' Rate convention linked'Pos_hint: {'center_x': 1,'center_y': 0.75}