1
我已經在這幾個小時現在,嘗試每一種解決方案,我能找到這裏,並試圖隨機的東西.... 我試圖建立在由3個按鍵佈局頂部,然後是可滾動的GridLayout或BoxLayout。我只是無法弄清楚什麼是錯的......我讀過一個響應「綁定佈局的大小以適應自己:」但我使用的是screenmanagement,並且無法弄清楚如何使用我的代碼設置來做到這一點滾動網格佈局中的BoxLayout Kivy
<HomeScreen>:
BoxLayout:
orientation: "vertical"
BoxLayout:
size_hint: 1,.1
orientation: "horizontal"
Button:
text:"1"
Button:
text:"2"
Button:
text:"3"
ScrollView:
GridLayout:
orientation: "vertical"
size_hint_y: None
row_default_height: 60
cols:1
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
Button:
我發誓,我試過了...什麼接近......我想......哈哈謝謝你這麼多!現在,將「Grid:height:self.minimum_height」設置爲所需按鈕所需的最小高度的那條線是正確的? – Lemiwinks
是的,沒錯。 'self.minimum_height'是包含所有子部件的最小高度。 @Lemiwinks – FJSevilla