Opened 5 years ago

Closed 5 years ago

#15232 closed enhancement (fixed)

Option to scroll the ribbon bar by an entire child section per click

Reported by: wxBen Owned by:
Priority: normal Milestone:
Component: GUI-all Version: stable-latest
Keywords: ribbon bar page scroll Cc:
Blocked By: Blocking:
Patch: yes


If a ribbon bar page contents are wider than the page, the page will show scroll buttons. Clicking on one scroll button scrolls eight pixels (see ScrollLines). People are complaining that this is too little and that they have to click repeatedly many times to uncover larger sections.

This patch adds an option so that a single click on the scroll button will scroll to fully uncover the current partially visible section or to fully uncover the next not yet visible child section.

This option is not turned on by default, mostly so as to not modify existing behavior, though I thin it is preferable to the current default.

In short, turning this option on in a ribbon bar page will cause its scroll buttons to work like the ones in Excel.

Attachments (2)

RibbonScrollSection.diff download (8.4 KB) - added by wxBen 5 years ago.
RibbonScrollSection2.diff download (5.8 KB) - added by wxBen 5 years ago.

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by wxBen


comment:1 Changed 5 years ago by vadz

I agree that scrolling by "element" makes more sense than scrolling by a fixed number of pixels so I think we should just do it, i.e. change the current behaviour instead of providing an option. This doesn't break compatibility because the API is the same and the functionality is still there, and I don't think anybody could possibly rely on scrolling working on pixel basis.

So could you please update the patch to just do it like this?

And if ScrollSections() needs to be public (I'm not sure about this to be honest...), could you please add @since 2.9.5 to its documentation?


Changed 5 years ago by wxBen


comment:2 Changed 5 years ago by wxBen

I have made the changes you suggested and attached a new patch. Please review.

(I left ScrollSections public, because ScrollPixels and ScrollLines are both public and callable. Likely only because the scroll button code is calling it, but I doubt anyone else would call it.)


comment:3 Changed 5 years ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [74068]) Improve horizontal scrolling in wxRibbonControl.

Scroll by entire "sections", i.e. panes of the ribbon, instead of scrolling by
a fixed number of pixels as it's much more useful and user-friendly to uncover
the next section entirely instead of asking the user to press on the arrow
several times before being able to use it.

Closes #15232.

Note: See TracTickets for help on using tickets.