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

Calculate Scroll based on Childs relative position to ScrolledPanel #1950

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

seanbudd
Copy link

ScrolledPanels do not automatically scroll via tabbing if the focused control is not a direct child of the ScrolledPanel

Instead of using child.GetRect(), which calculates the position relative to the parent, calculate the position of the child relative to the ScrolledPanel itself.

wx/lib/scrolledpanel.py Outdated Show resolved Hide resolved
wx/lib/scrolledpanel.py Outdated Show resolved Hide resolved
@seanbudd
Copy link
Author

didn't mean to close this

@codeofdusk
Copy link

CC @RobinD42.

@dpy013
Copy link

dpy013 commented Oct 20, 2022

cc @@swt2c
Can you review the current pull request?

@swt2c
Copy link
Collaborator

swt2c commented Oct 24, 2022

cc @@swt2c Can you review the current pull request?

It seems OK to me, but is there a way to observe the problem in the existing code (e.g., in a demo or something)?

@seanbudd
Copy link
Author

It seems OK to me, but is there a way to observe the problem in the existing code (e.g., in a demo or something)?

I'm not sure on the standard way to create a minimal sample for this repo.
This can easily be reproduced by creating a ScrolledPanel, then tabbing to a control which should cause the panel to scroll.

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.

4 participants