Opened 5 years ago

Closed 5 years ago

#14844 closed defect (fixed)

Fix ribbon bar initial scroll buttons issue

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


If you create a new ribbon bar you initially call Layout after adding everything to it. If a page is initially too wide to fit, it will create a right scroll button for it at this time, but the height of the bar and hence the scroll button will still be the initial default zero. If the user then flips to a page with such a scroll button, it will show those scroll bars, but since their size is zero, you get a black square or dirty left over to the far right where the scroll button normally sits. The page knows how big it should be and reserves that space but the scroll bar does not cover and paint it. These scroll buttons remain stuck with size zero unless you widen your application to make the scroll bars disappear (which deletes them) and then shrink it back down again (which recreates them with the right size).

The bar calls Layout continually which creates or destroys the scroll bars as necessary. This change tweaks that code slightly so that if scroll buttons are present on a page, it goes through the ShowScrollButtons method which now merely updates the scroll button sizes, rather than just create them if they are missing.

Attachments (1)

FixInitialScrolls.diff download (4.3 KB) - added by wxBen 5 years ago.

Download all attachments as: .zip

Change History (2)

Changed 5 years ago by wxBen


comment:1 Changed 5 years ago by VZ

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

(In [72998]) Fix ribbon bar scroll buttons visibility bug.

Fix scroll buttons update code in wxRibbonPage.

Closes #14844.

Note: See TracTickets for help on using tickets.