【发布时间】:2018-03-10 15:30:33
【问题描述】:
我有一个这样的动态类:
<BLMother@BoxLayout>:
orientation:"horizontal"
padding: 10, 0
spacing: 10
对于我的一些 CustomBoxLayout,我想添加一个画布:before。 我可以创建一个新的动态类,它将两者的值结合起来,如下所示:
<BLChildren@BoxLayout>:
orientation:"horizontal"
padding: 10, 0
spacing: 10
canvas.before:
Color:
rgba: 1, 1, 1, 0.8
Rectangle:
size: self.size
pos: self.x + self.width*0.025, self.y
有没有办法BLChildren 可以继承BLMother 的所有值?
我使用 Kivy (1.10.1.dev0)
【问题讨论】:
标签: python-3.x class nested kivy kivy-language