Setting up the TabbedPanelHeader

I use TabbedPannel

in my application and then some TabbedPanelItem

now I want to customize them.

I went kivy/examples/widgets/tabbed_panel_showcase.py

to see some examples of these settings.

They have a class StandingHeader

that inherits from TabbedPanelItem

and then adds additional properties:

class StandingHeader(TabbedPanelHeader):
    pass
<StandingHeader>
    color: 0,0,0,0
    disabled_color: self.color
    Scatter:
        do_translation: False
        do_scale: False
        do_rotation: False
        auto_bring_to_front: False
        rotation: 70
        size_hint: None, None
        size: lbl.size
        center_x: root.center_x
        center_y: root.center_y
        Label:
            id: lbl
            text: root.text
            size: root.size
            color: 1, 1, 1, .5 if self.disabled else 1
            pos: 0,0

      

I tried to reuse this code to change mine TabbedPanelItem

, but it didn't work, all the shortcuts were gone. It looks like it TabbedPanelItem

inherits from TabbedPanelHeader

, so it should work, but if I change StadingHeader

in the showcase example to inherit now from TabbedPanelItem

, it also stops working. So with that in mind, my question is how to configure TabbedPanelItem

?

+3


source to share





All Articles