【发布时间】:2022-01-02 08:03:22
【问题描述】:
我声明我已经阅读了其他用户对这个问题的回答,但他们都没有帮助我。我正在尝试使用 kivy GUI 界面在 python 中编写一个计算器,他的问题是我无法删除此处所附照片中以红色突出显示的空间。我已经尝试过:size_hint: None,None 和 size:root.size[0], "5dp" 来缩放 BoxLayouts 但它不起作用
[1]: https://i.stack.imgur.com/y1ZwF.png
BoxLayoutExample:
<BoxLayoutExample>:
orientation: "vertical"
Label:
text: "0"
font_size: "30dp"
BoxLayout:
orientation: "horizontal"
Button:
text: "7"
size_hint: .1, .3
Button:
text: "4"
size_hint: .1, .3
Button:
text: "1"
size_hint: .1, .3
BoxLayout:
orientation: "horizontal"
Button:
text: ","
size_hint: .1, .3
Button:
text: "0"
size_hint: .1, .3
Button:
text: "="
size_hint: .1, .3
【问题讨论】:
标签: python user-interface interface kivy calculator