I recently started to get in to Kivy and now I am trying to create app for me and my friends which is a D&D sheet. I wanted to have all the important stats in one tab in which you can scroll down so that the text font doesn't have to be that small but I can't get it working with the self.minimum_height
property of the GridLayout that will contain other elements.
I am running kivy version 1.10.0 If I set the height manually the ScrollView works just fine.
Here is my .kv file
<TabbedPanel>:
do_default_tab: False
tab_pos: 'bottom_mid'
tab_width: self.width / 4
TabbedPanelItem:
text: "Character"
ScrollView:
size_hint: (1, None)
height: root.height
GridLayout:
cols: 1
size_hint_y: None
height: self.minimum_height
Button:
text: "Hello"
Button:
text: "Hello"
Button:
text: "Hello"
Button:
text: "Hello"
Button:
text: "Hello"
Button:
text: "Hello"
Button:
text: "Hello"
Button:
text: "Hello"
Button:
text: "Hello"
Button:
text: "Hello"
Button:
text: "Hello"
Button:
text: "Hello"
Button:
text: "Hello"
Button:
text: "Hello"
Button:
text: "Hello"
TabbedPanelItem:
text: "Weap's & Mods"
TabbedPanelItem:
text: "Vehicle"
TabbedPanelItem:
text: "Vehicle Upgr"
You need to also set an explicit height for each contained widget, so that the GridLayout can add them together to calculate its minimum height. For instance, in your example you could add the following lines to each button:
size_hint_y: None
height: dp(30)