[英]Python Kivy GridLayout, positioning
大家好,我是 kivy 的新手,无法获得预期的结果。
:标题:“测试”网格布局:行:2列:2间距:20 canvas.before:颜色:rgba:0、1、0、1矩形大小:self.size pos:self.pos
GridLayout:
rows:1
cols:2
size: 200, 200
size_hint: None, None
GridLayout:
rows: 1
cols: 2
Button:
text: "test0-1"
size: 100, 100
size_hint: None, None
Button:
text: "test0-2"
size: 100, 100
size_hint: None, None
Button:
text: "test01-1"
size: 200, 100
size_hint: None, None
Button:
text: "test1"
size_hint: None, None
size: 500, 500
:标题:“测试” GridLayout:行:1 列:2 #spacing:20 canvas.before:颜色:rgba:0、1、0、1 矩形大小:self.size 位置:self.pos
GridLayout:
rows:2
cols:1
size: 200, root.size[1]
size_hint: None, None
#pos_hint:{"x":1,"y":1}
GridLayout:
rows: 1
cols: 2
Button:
text: "test0-1"
size: 100, 100
size_hint: None, None
Button:
text: "test0-2"
size: 100, 100
size_hint: None, None
Button:
text: "test01-1"
size: 200, root.size[1] - 100
size_hint: None, None
Button:
text: "test1"
#size_hint: .7
#size: 500, 500[enter image description here][1]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.