wxScrolledWindow auto scrolled after click its top/bottom wxCollapsiblePane

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
User avatar
JohnKnow
Knows some wx things
Knows some wx things
Posts: 41
Joined: Tue Aug 31, 2021 4:14 am

wxScrolledWindow auto scrolled after click its top/bottom wxCollapsiblePane

Post by JohnKnow »

Hi,
I put some wxCollapsiblePane in wxScrolledWindow. And all wxCollapsiblePane are expaned, this make wxScrolledWindow's scroll bar appear.

Once I click the button in last wxCollapsiblePane, wxScrolledWindow will scroll down. This may make my click on a button invalid as the scroll may make my mouse out of that button after mouse up.
Same behaviour if I click a button on the first wxCollapsiblePane, wxScrolledWindow will scroll up.


Seems if a wxCollapsiblePane in wxScrolledWindow is not showed entirely, wxScrolledWindow will scroll to show wxCollapsiblePane all once click any area of wxCollapsiblePane.
Don't know whether this a designed behaviour, but it does may cause user action invalid in some time.


I prepared a little example, just click the first and last wxCollapsiblePane area in the window, you will see it.
Appretiate if any guy can tell me how to debug wx event system.
Attachments
wxStudy.zip
(1.35 KiB) Downloaded 41 times
No, I know everything.
User avatar
JohnKnow
Knows some wx things
Knows some wx things
Posts: 41
Joined: Tue Aug 31, 2021 4:14 am

Re: wxScrolledWindow auto scrolled after click its top/bottom wxCollapsiblePane

Post by JohnKnow »

An enhancement is created to track this issue.
https://trac.wxwidgets.org/ticket/19341
No, I know everything.
Post Reply