Skip to content

Calculate Scroll based on Childs relative position to ScrolledPanel#1950

Merged
swt2c merged 2 commits intowxWidgets:masterfrom
seanbudd:fix-scrolledpanel-tabbing
Feb 27, 2025
Merged

Calculate Scroll based on Childs relative position to ScrolledPanel#1950
swt2c merged 2 commits intowxWidgets:masterfrom
seanbudd:fix-scrolledpanel-tabbing

Conversation

@seanbudd
Copy link
Copy Markdown
Contributor

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.

@seanbudd
Copy link
Copy Markdown
Contributor Author

didn't mean to close this

@codeofdusk
Copy link
Copy Markdown

CC @RobinD42.

@dpy013
Copy link
Copy Markdown

dpy013 commented Oct 20, 2022

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

@swt2c
Copy link
Copy Markdown
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
Copy Markdown
Contributor 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.

@seanbudd
Copy link
Copy Markdown
Contributor Author

Bumping this

@swt2c swt2c merged commit 9b901a6 into wxWidgets:master Feb 27, 2025
@seanbudd
Copy link
Copy Markdown
Contributor Author

Thanks @swt2c ! Apologies I never got around to a sample

seanbudd added a commit to nvaccess/nvda that referenced this pull request Oct 14, 2025
Closes #17751
Summary of the issue:

Solving #12224 required introducing a hack to fix wx.lib.scrolledpanel.ScrolledPanel.
This has now been fixed in wxPython 4.2.3: wxWidgets/Phoenix#1950.
As such, we can revert the hack now
Description of user facing changes:

None
Description of developer facing changes:

wxPython has been updated, this can cause API breaking changes sometimes
Support class has been removed.
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