这是我的mykv.kv
文件的相关片段:
<RemoveScreen>:
MyLayout:
MyLogo:
GridLayout:
rows: 6
cols: 2
padding: 100,80,100,80
Label:
font_size: "20sp"
bold: True
color: [1,1,0,1]
text: "Part number:"
Label:
text: "Box 02"
Label:
font_size: "20sp"
bold: True
color: [1,1,0,1]
text: "Part description:"
Label:
text: "Box 04"
Label:
font_size: "20sp"
bold: True
color: [1,1,0,1]
text: "Quatity on hand:"
Label:
#font_size: "20sp"
text: "Box 06"
Label:
font_size: "20sp"
bold: True
color: [1,1,0,1]
text: "Bin location:"
Label:
text: "Box 08"
Label:
font_size: "20sp"
bold: True
color: [1,1,0,1]
text: "Direction:"
Label:
text: "Box 10"
Label:
font_size: "20sp"
bold: True
color: [1,1,0,1]
text: "Scan time:"
Label:
text: "Box 12"
MyButtons:
#buttons
上面的代码输出如下:
我想在顶部有一个合并的单元格,它居中对齐,左列右对齐,右列左对齐。左列将从 MySQL 查询中获取字符串,并替换“Box #”字符串,如下所示:
问题: 您能否在我的代码中实现:
- 将两个单元格的第一行合并为一个
- 右对齐左列
- 左对齐右列(根据上面的布局)