views:

310

answers:

2

After adding a ribbon item, or calling a method that updates an item, the ribbon does not refresh correctly. Sometimes it's OK after resizing the window but most of the time the panel is in a collapsed state.

I tried all the functions I could think of, ReposPanels, RecalcWidths, RecalcLayout etc etc but nothing worked...

+1  A: 

UNTIL...

    m_ribbonBar.ForceRecalcLayout(); //CMFCRibbonBar m_ribbonBar;

WOOHOO!

This is not obvious by googling so I decided to add it as an already answered question on here (mainly so I could find it again myself after a couple of months have gone by)

demoncodemonkey
A: 

I am sure I had figured it by myself after a couple of months. Anyway, thank you.

Chema