Strange TabbedPanel behaviour
Software Versions
- Python: 3.10
- OS: Windows
- Kivy: 2.3.0 (also 2.1.0)
- Kivy installation method: python -m pip install --pre "kivy[full]" kivy_examples (on a virtualenv)
Consider the tabs example in share/kivy-examples/widgets/tabbedpanel.py.
Open it on windows.
If you press the mouse button on the tab2 tab button, the blue underline goes immediately to this tab. But, if you move the mouse outside tab2 and only then release the mouse button, you get tab2 selected but the content is the one of first tab.
This is really confusing. I would expect that, either tab2 content is immediately selected when the blue underline moves, or the blueline only moves on mouse button release…
Setting ButtonBehavior.always_release on TabbedPanelHeader to True solves it.
To test it, just do this in the KV file:
<TabbedPanelHeader>:
always_release: True
So, most probably, you just need to force always_release to True in TabbedPanelHeader.
Thanks and Best Regards! VascoLP