Share your code, running the “simple example” from the docs, the text on the Labels on the tabs are centered. The tabs are derived from ToggleButtons.
'''
TabbedPanel
============
Test of the widget TabbedPanel.
'''
from kivy.app import App
from kivy.uix.tabbedpanel import TabbedPanel
from kivy.lang import Builder
Builder.load_string("""
<Test>:
size_hint: .5, .5
pos_hint: {'center_x': .5, 'center_y': .5}
do_default_tab: False
TabbedPanelItem:
text: 'first tab'
Label:
text: 'First tab content area'
TabbedPanelItem:
text: 'tab2'
BoxLayout:
Label:
text: 'Second tab content area'
Button:
text: 'Button that does nothing'
TabbedPanelItem:
text: 'tab3'
RstDocument:
text:
'\\n'.join(("Hello world", "-----------",
"You are in the third tab."))
""")
class Test(TabbedPanel):
pass
class TabbedPanelApp(App):
def build(self):
return Test()
if __name__ == '__main__':
TabbedPanelApp().run()
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/b5f9bda8-a11b-4b79-8f5f-733b344a3872n%40googlegroups.com.
I’m running kivy 2.1; I do not see that issue. Please share a runnable program.
In the example below, I changed the tab_pos to match your example, but do not have the same issue.
from kivy.app import App
from kivy.lang import Builder
kv = """
AnchorLayout:
TabbedPanel:
size_hint: .9, .9
do_default_tab: False
tab_pos: 'left_bottom'
tab_width: 150
TabbedPanelItem:
text: 'first tab'
Label:
text: 'First tab content area'
TabbedPanelItem:
text: 'tab 2'
Label:
text: 'Second tab content area'
TabbedPanelItem:
text: 'tab3'
Label:
text: 'Third tab content area'
"""
class TabbedPanelApp(App):
def build(self):
return Builder.load_string(kv)
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/54620a0f-1c29-4930-ae5b-1a5edab72f92n%40googlegroups.com.