refreshing delphi ribbongroup width

Hi, I'm new at using tribbon, I need to hide some buttons from a ribbongroup depending on which user is entering my software.   The buttons are hidden when I set the corresponding tAction.visible at false but the problem is that the ribbongroup does not resize to fit the remaining buttons, it just leaves a blank space even tough there is no more buttons visible on a large area on the right part of the ribbongroup.

Can I force delphi to recalculate the right width at runtime?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TRibbonGroups (RG) are free to set their width, until you add and set TActionClientItem.
From ActionManager->ActionBars->Add new item and link to your TRibbonGroup, so far the RG can be resized at design-time or run-time. But the moment you select the recently created ActionBar and start adding Items and define their actions, even if it's a new empty action, the RG will be set to AutoSize, and now you can not resize.
So what you can do is do not link the items to the actions at design time, but rather link the Item to the action when you want to give the user (at run-time), and hence you get the RG ready to be resized.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.