0
practice screenScrollView在一個anchorlayout中。蟒蛇。 kivy
這是從.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你可以從圖像中看到,所有的按鈕都堆疊在彼此的頂部,所以你可以看到它們..我想添加一個滾動視圖到anchorlayout,因此用戶可以滾動瀏覽主題名稱列表。再次感謝你,我很感激 –