【发布时间】:2016-09-27 18:08:16
【问题描述】:
这是来自 .py 文件
如您所见,屏幕由屏幕管理器控制
class Practice_Page(Screen):
pass
class PracticeList(BoxLayout):
def practicelist(ScrollView):
practicelist.bind(minimum_height=layout.setter('height'))
.KV 文件:
<Practice_page>:
canvas.before:
Rectangle:
pos: self.pos
size: self.size
source: 'background1.png'
AnchorLayout:
anchor_x: 'center'
anchor_y: 'center'
PracticeList:
size: 900,30
size_hint: None,None
do_scroll_x: False
BoxLayout:
orientation: 'vertical'
padding: 10
cols: 1
Button:
text: 'The Real Number System'
on_press: root.manager.current = 'open_topics'
Button:
text: 'Absolute Value'
on_press: root.manager.current = 'open_practice'
Button:
text: 'Operations W/ Integers & Fractions'
on_press: root.manager.current = 'open_topics'
Button:
text: 'Operations W/ Zero'
on_press: root.manager.current = 'open_formulas'
我还有大约 30 个按钮。我不知道自己做错了什么,任何帮助或建议都会非常有帮助。
【问题讨论】:
-
尝试解释更多,我现在不知道你的问题是什么。如果你解释得更好,那么我可能会帮助你。
-
@MatthiasSchreiber 正如您从图像中看到的那样,所有按钮都堆叠在彼此之上,因此您可以看到它们。我想在锚布局中添加一个滚动视图,以便用户可以滚动浏览主题名称列表。再次感谢您,我很感激
标签: python scrollview kivy