Toggling CommandBar Buttons Visible at Runtime

Add-in Express™ Support Service
That's what is more important than anything else

Toggling CommandBar Buttons Visible at Runtime
 
Ryan Farley


Guest


I have and addin where I have some buttons that are created in the designer at design-time.

When certain error conditions arise in my application, I set all the standard buttons I created at design-time to Visible = false and then create some new buttons dynamically at run-time.

All of this is working great. However, then the error conditions are cleared, I then remove my dynamically created buttons and then set all of the standard buttons to Visible = true again. The problem is that these buttons do not appear again. They do not become visible again. The dynamically created buttons have no problem showing and hiding as I toggle the Visible property, but my buttons I created at design-time will successfully hide, but then do not show again once I set Visible = true again.

Any ideas?

ADX 2009 (5.1.2022)
Outlook 2007 SP2 (12.0.6514.5000)
Windows 7
Posted 05 Nov, 2009 18:22:12 Top
Ryan Farley


Guest


BTW, when I debug and step through, the button objects do properly show Visible as true/false when set. They just don't show up on the toolbar.
Posted 05 Nov, 2009 18:25:41 Top
Ryan Farley


Guest


Ugh.

Something stupid on my part. All working, please ignore.

Thanks.
Posted 05 Nov, 2009 18:31:45 Top
Eugene Astafiev


Guest


Hi Ryan,

It is Ok. You are welcome;-)
Posted 06 Nov, 2009 04:18:08 Top