-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix scrolling in TabbedPanel #4559
Conversation
Better this way, as it throws errors if it scrolls by default (and will break api for versions older than this patch) |
def switch_to(self, header): | ||
'''Switch to a specific panel header. | ||
def switch_to(self, header, do_scroll=False): | ||
'''Switch to a specific panel header. If used with `do_scroll=True`, it scrolls to the header's tab too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pep8!
pep8 fixed
'''Switch to a specific panel header. | ||
def switch_to(self, header, do_scroll=False): | ||
'''Switch to a specific panel header. If used with | ||
`do_scroll=True`, it scrolls to the header's tab too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A versionchanged tag could be added for the new arg.
Ah, I can't edit after merge. O.o |
switch_to(tab, do_scroll=False)
is the behavior until this patch. This introducesdo_scroll
keyword, which if set to True(by default), scrolls the tab list to the header of the tab TabbedPanel switches to.