Kivy - Add an icon to tab buttons

Viewed 2963

I am using a TabbedPanel in Kivy, it works perfectly well, but I would like to customize the tab buttons a bit and add a icon next to the text.

Right now I have something like this : Current tab

And I would like something like that : Tab with icons

My kv file is as follows :

<KivyMasterPanel>
    do_default_tab: False
    id: MasterPanel
    tab_width: self.size[0]/len(self.tab_list)

    TabbedPanelItem:
        id: tab_A
        text: 'A'

    TabbedPanelItem:
        id: tab_B
        text: 'B'

    TabbedPanelItem:
        id: tab_C
        text: 'C'

Is there something I can use instead of TabbedPannelItem.text to put a BoxLayout or something inside. If possible I would like to be able to create my tabs using a kv file, but if it is not possible, no problem.

Thank you all in advance for your help.

1 Answers
Related