Source

kivy-catalog / kivycatalog.kv

Full commit
#:kivy 1.4


<Catalog>:
    language_box: language_box
    BoxLayout:
        spacing: 5
        TabbedPanel:
            size_hint: .6, 1
            tab_pos: "left_top"
            default_tab_text: "Introduction"
            default_tab_content: introduction_tab

            Label:
                id: introduction_tab
                text: "A super awesome catalog of kivy widgets"

            TabbedPanelHeader:
                text: 'Layouts'
                content: layout_tab

            Accordion:
                id: layout_tab
                AccordionItem:
                    on_collapse: root.show_kv(*args)
                    title: "FloatLayout"
                    kv_container: floatlayoutcontainer
                    FloatLayoutContainer:
                        id: floatlayoutcontainer
                AccordionItem:
                    on_collapse: root.show_kv(*args)
                    title: "BoxLayout"
                    kv_container: boxlayoutcontainer
                    BoxLayoutContainer:
                        id: boxlayoutcontainer
                AccordionItem:
                    on_collapse: root.show_kv(*args)
                    title: "AnchorLayout"
                    kv_container: anchorlayoutcontainer
                    AnchorLayoutContainer:
                        id: anchorlayoutcontainer
                AccordionItem:
                    on_collapse: root.show_kv(*args)
                    title: "GridLayout"
                    kv_container: gridlayoutcontainer
                    GridLayoutContainer:
                        id: gridlayoutcontainer
                AccordionItem:
                    title: "Introduction"
                    Label:
                        text_size: self.width-200, None
                        markup: True
                        text: '''Layouts are containers that automatically position their child widgets according to certain layout rules.\n\n[b]Anchor Layout[/b] aligns children to a border\n[b]Box Layout[/b] arranges children in a vertical or horizontal box.\n[b]Float layout[/b] places boxes according to their pos and size hints\n[b]Grid layout[/b] arranges the children in a matrix\n[b]Stack layout[/b] arranges children vertically or horizontally as far as they will fit.'''

        BoxLayout:
            id: bl
            orientation: "vertical"
            size_hint: .4, 1
            TextInput:
                text_size: self.width-20, self.height-20
                valign: "top"
                id: language_box
                text: "This box will display the kivy language for whatever has been selected"
            Button:
                size_hint: 1, None
                height: 50
                text: "Update"
                on_press: root.change_kv(*args)