0
我试图把这个部件放在底部和右侧位置,边距为16dp,但是我已经通过多种方式尝试了它,并使用了几种布局不行。有谁能够帮助我?Kivy - 底部和右侧位置部件和margim
ex35.py
from kivy.app import App
from kivy.core.window import Window
Window.clearcolor = (1, 1, 1, 1)
class Ex35(App):
pass
Ex35().run()
ex35.kv
FloatLayout:
BoxLayout:
orientation:'vertical'
Button:
text:'Hello'
Button:
text:'Hello'
Button:
text:'Hello'
Button:
text:'Hello'
Button:
text:'Hello'
Button:
text:'Hello'
Button:
text:'Hello'
Button:
text:'Hello'
Widget:
id: ellipse
size_hint: (None, None)
size: (dp(56), dp(56))
canvas:
Color:
rgba: 0, 1, 0, 1
Ellipse:
size: self.size
您是否试过'pos_hint'?你究竟是什么意思是16dp的余量?像从右下角16dp的空间? –
Margim 16dp我在Ellipse中添加了'pos:(dp(16),dp(16))'。我没有得到的是把Ellipse带到底部 – rafaelcb21