0
我在寻找如何把按钮相同的属性,如CSS语言组...Kivy - 做一个类
我有了这个kivy文件:
<Clavier>:
Button:
pos: 0, root.width/5
size: root.width/10 , root.width/10
text: 'A'
Button:
y: root.width/5
x: root.width/10
size: root.width/10 , root.width/10
text: 'Z'
Button:
y: root.width/5
x: root.width/5
size: root.width/10 , root.width/10
text: 'E'
Button:
y: root.width/5
x: root.width * 3/10
size: root.width/10 , root.width/10
text: 'R'
Button:
y: root.width/5
x: root.width * 4/10
size: root.width/10 , root.width/10
text: 'T'
...
我们能否得到这个代码优化?
感谢您的阅读。
它不工作,你可以给更多的代码吗?谢谢。 –