Skip to content
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

Merged
merged 3 commits into from
Aug 26, 2016
Merged

Fix scrolling in TabbedPanel #4559

merged 3 commits into from
Aug 26, 2016

Conversation

KeyWeeUsr
Copy link
Contributor

switch_to(tab, do_scroll=False) is the behavior until this patch. This introduces do_scroll keyword, which if set to True(by default), scrolls the tab list to the header of the tab TabbedPanel switches to.

@KeyWeeUsr
Copy link
Contributor Author

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pep8!

@akshayaurora akshayaurora merged commit 4f5b4c8 into master Aug 26, 2016
@akshayaurora akshayaurora deleted the KeyWeeUsr-patch-1 branch August 26, 2016 17:49
'''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.
Copy link
Contributor

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.

@KeyWeeUsr KeyWeeUsr restored the KeyWeeUsr-patch-1 branch August 26, 2016 18:26
@KeyWeeUsr
Copy link
Contributor Author

Ah, I can't edit after merge. O.o

@KeyWeeUsr KeyWeeUsr deleted the KeyWeeUsr-patch-1 branch August 26, 2016 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants