Question

I need to show and hide various buttons that are all on the ribbonbar in designer.

Depending on what the user has selected on the form at the time depends on what i want to show/hide.

I cannot figure out how to get the ribbon to refresh properly, showing both the new button (without scrolling mouse over the new button) and resizing (width ways) to allow the new button to fit properly.

i have looked all over the web for other questions that answer this, and asked devcomponents forums, (still waiting on response from that)

Était-ce utile?

La solution

I have figured out what works for this.

ribbon.Refresh()

'refresh size of ribbonPanel1, barlayout for the show/hide of miRoom
RibbonPanel1.PerformLayout()
ribbon.PerformLayout()

my button was within RibbonPanel1, and this was shown by a tabItem on the ribbon, the RibbonPanel1 was also on the ribbon (as otherwise it wont show)

Autres conseils

Here is the KB article which covers working from code and other details: http://www.devcomponents.com/kb2/?p=472

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top