Weird issue with AdvToolBar

Issue in Delphi XE7 and 10 Seattle
Windows 10 x64
Component Pack

AdvToolbars button that have visible := false do not reappear when you set visible := true.

To reproduce:
Drop a TAdvToolBar (set it's autosize to false and make it larger to help see the issue)
Add 3 buttons in the toolbar ('A', 'B', 'C')
Add a button on the form that will switch the visible property of button 'B' (AdvToolBarButton2.Visible := not AdvToolBarButton2.Visible;)

Run the project.
Press the button to toggle visibility. --> Button 'B' will disapear
Press the button to toggle visibility again. --> Button 'B' will not be visible. * This is the issue.
Now click on the toolbars buttons and 'B' will eventually show again. (clicking once on button 'C' should be enough to make button 'B' reappear).

If I do the same thing with a normal (non tms) toolbar, it works properly.

Is this something that can be fixed?
Calling Repaint on the toolbar works but we would prefer a fix.


This was a performance related change/improvement we did with making the child visibility update under all circumstances with


Especially when you'd hide/unhide many buttons at the same time that have a resizing effect on the toolbar, this technique improved performance.

Just to make sure I understand, this is by design and I should call toolbar.Update?



Actually, there is one thing I find strange though.

When I compile this demo with my computer I have the issue.
If my coworker compiles the demo on his computer it works fine. (button becomes visible again as soon as you set it's visible to true without having mess with the form to force a repaint)

Both computer have the same Windows, Delphi, components version. Hardware is also  almost the same.

That makes me think that the problem might not simply be the optimization you mention. If it was, wouldn't both computer's compiled exe have the intended behavior or not showing the button as soon as you set it's visible to true?

I tried uninstalling / reinstalling TMS Component Pack but with no change.
My computer produce the "issue" on Delphi XE7 and 10 Seattle so I don't think I have a compiler flag that would mess it up (would be strange to have a bad setting on two version by accident at the same time).

Since it works with normal non tms toolbars I would guess it's TMS related? Can you give me instructions on how to do a full clean uninstall of the Component Pack in case it have a messed up dcu somewhere on my computer?

It used to work correctly on my computer and I do not have the exact time when the issues appareared. I think (not certain) it appeared when I started installing many version of the Component Pack bak to back to track another issue. Tha'ts why I would like a clean unisnstall procedure to be sure it's not caused by some old file.

Thanks for your time.

Verify that the correct/expected AdvtoolBar.pas is being compiled & linked with your app.