wider child control makes wxScrolledWindow auto scroll Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Ronald
Earned some good credits
Earned some good credits
Posts: 104
Joined: Mon Mar 05, 2018 4:17 am

wider child control makes wxScrolledWindow auto scroll

Post by Ronald » Thu Sep 05, 2019 4:15 pm

1. wxGrid in wxScrolledWindow
2. wxGrid is wider than wxScrolledWindow
3. when clicking on a cell of wxGrid, wxScrolledWindow auto scrolled, to show the ending part of wxGrid

How to make wxScrolledWindow not auto scroll in the case?

User avatar
doublemax
Moderator
Moderator
Posts: 13985
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wider child control makes wxScrolledWindow auto scroll

Post by doublemax » Thu Sep 05, 2019 5:39 pm

Use the source, Luke!

Ronald
Earned some good credits
Earned some good credits
Posts: 104
Joined: Mon Mar 05, 2018 4:17 am

Re: wider child control makes wxScrolledWindow auto scroll

Post by Ronald » Fri Sep 06, 2019 3:19 am

That's it, thanks.

Ronald
Earned some good credits
Earned some good credits
Posts: 104
Joined: Mon Mar 05, 2018 4:17 am

Re: wider child control makes wxScrolledWindow auto scroll

Post by Ronald » Fri Sep 06, 2019 3:25 am

The doc says it is supported since 3.1.3
The lib directory contains some files like "wxbase313u_net_vc_x64.dll", but no ShouldScrollToChildOnFocus for override.
I've checked the git repo, the newest version v3.1.2 in the result of git tag .
Which commit is better to check out for ShouldScrollToChildOnFocus?
Found some tags, like LAST_GOOD, RELEASE, tried both, cmake not work for both commits.
Last edited by Ronald on Sat Sep 07, 2019 11:55 am, edited 1 time in total.

User avatar
doublemax
Moderator
Moderator
Posts: 13985
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wider child control makes wxScrolledWindow auto scroll

Post by doublemax » Fri Sep 06, 2019 7:17 am

I would just get the latest master branch.

Otherwise you could also try to override
void HandleOnChildFocus(wxChildFocusEvent& event);
Use the source, Luke!

Ronald
Earned some good credits
Earned some good credits
Posts: 104
Joined: Mon Mar 05, 2018 4:17 am

Re: wider child control makes wxScrolledWindow auto scroll

Post by Ronald » Fri Sep 06, 2019 7:45 am

doublemax wrote:
Fri Sep 06, 2019 7:17 am
I would just get the latest master branch.

Otherwise you could also try to override
void HandleOnChildFocus(wxChildFocusEvent& event);
If HEAD commit works without unacceptable bug, I prefer it.

Thanks

User avatar
doublemax
Moderator
Moderator
Posts: 13985
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wider child control makes wxScrolledWindow auto scroll

Post by doublemax » Fri Sep 06, 2019 8:37 am

If HEAD commit works without unacceptable bug, I prefer it.
It's always possible that a recent commit breaks something, but it's rare and if it happens, it's usually fixed quickly.
Use the source, Luke!

Ronald
Earned some good credits
Earned some good credits
Posts: 104
Joined: Mon Mar 05, 2018 4:17 am

Re: wider child control makes wxScrolledWindow auto scroll

Post by Ronald » Sat Sep 07, 2019 7:22 am

doublemax wrote:
Fri Sep 06, 2019 8:37 am
It's always possible that a recent commit breaks something, but it's rare and if it happens, it's usually fixed quickly.
If HEAD commit is easy to use, it'll be easy to contribute to.
The only problem in my case (Visual Studio 2019) is that when file(s) added/removed
the solution needs to be regenerated by cmake and be rebuilt.

Post Reply