滚动视图中的多个boxlayout

时间:2017-02-05 05:59:02

标签: python kivy kivy-language

以下是kivy文件(.kv)的内容我正在尝试创建一个具有多个框布局的滚动视图(如电子商务布局列表视图中的一个)但不确定这里是否有错误。

<gridlay>:
    #size_hint: 1, None
    #size: 1000, 1000
    #pos_hint: {'right': 1, 'top': 1}
    do_scroll_x: False

    GridLayout:
        cols: 1
        size_hint_y: None
        size_hint_x: None
        #height: self.minimum_height
        #height: 1
        orientation:"vertical"
        BoxLayout:
            orientation:"horizontal"
            Button:
                text:"M1"
                size_hint: .7,.3
            Button:
                text:"M2"
                size_hint: .7,.2
            Button:
                text:"m3"
        BoxLayout:
            orientation:"horizontal"
            Button:
                text:"M1"
                size_hint: .7,.3
            Button:
                text:"M2"
                size_hint: .7,.2
            Button:
                text:"m3"
        BoxLayout:
            orientation:"horizontal"
            Button:
                text:"M1"
                size_hint: .7,.3
            Button:
                text:"M2"
                size_hint: .7,.2
            Button:
                text:"m3"
<ScrollButton@Button>
    size_hint: None,None
    #size_hint: 900, 40

enter image description here

0 个答案:

没有答案