TabbedPanel: fix first tab selection

This commit is contained in:
Qua-non 2012-10-21 19:22:34 +05:30
parent c35dca3656
commit a6b5683b4c
2 changed files with 2 additions and 5 deletions

View File

@ -15,17 +15,14 @@ Builder.load_string("""
<Test>:
size_hint: .5, .5
pos_hint: {'center_x': .5, 'center_y': .5}
#do_default_tab: False
default_tab: tab2
do_default_tab: False
TabbedPanelItem:
id: first_tab
text: 'first tab'
Label:
id: set1_content
text: 'First tab content area'
TabbedPanelItem:
id: tab2
text: 'tab2'
BoxLayout:
Label:

View File

@ -440,7 +440,7 @@ class TabbedPanel(GridLayout):
if dft in self.tab_list:
self._default_tab = None
self.remove_widget(dft)
self._switch_to_first_tab
self._switch_to_first_tab()
def _switch_to_first_tab(self, *l):
ltl = len(self.tab_list) - 1