Kivy 如何隐藏控件?

设置opacity 属性为0即可, 如下面的例子,当Button 1按下时整个Boxlayout都隐藏起来

#:kivy 1.4

BoxLayout:
    orientation: 'vertical'
    padding: 20
    spacing: 10
    opacity:1
    Button:
        text: "Button 1"
        on_release: self.parent.opacity=0
        size_hint: 1, None
    Button:
        text: "Button 2"
        size_hint: 1, 0.5
    Button:
        text: "Button 3"
原文地址:https://www.cnblogs.com/onsunsl/p/Kivy_Hidden_Widget.html