Toggle Inspector Command bars Visibility

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

Toggle Inspector Command bars Visibility
 
Srividhya Narayanan




Posts: 2
Joined: 2008-07-02
Hi,

We are using AddinExpress 3.5.1875.2005 in our development of an Outlook add-in. The requirement is to display our custom toolbar based on a config file entry. I have the code to read the config file and make the Explorer and Inspector command bars visible or invisible in the OfficeModule_AddinInitialize event.

Even though, i set the visible property to false, the inspector command bar is always visible. What am i missing from the following code:
adxOlExplorerCommandBar.Visible = false;
adxOlInspectorCommandBar.Visible = false;

If i make CommnadBar.Enabled = false, then it does not get displayed but it is not also available in the View->Toolbar menu, for the user to turn it on again if required.

Posted 02 Jul, 2008 14:16:29 Top
Andrei Smolin


Add-in Express team


Posts: 18794
Joined: 2006-05-11
Hi Srividhya,

See How to hide a command bar at
http://www.add-in-express.com/forum/read.php?FID=5&TID=3639


Andrei Smolin
Add-in Express Team Leader
Posted 02 Jul, 2008 15:40:29 Top
Srividhya Narayanan




Posts: 2
Joined: 2008-07-02
Hi Andrei,

Thank you very much for your immediate reply.

The solution mentioned in the other thread (making the folder name to some invalid string) works with one caveat. It also removes the entry for my custom toolbar under View->Toolbar list.

How do i make my custom toolbar hidden but still listed under View menu so that the end user can check it to get my custom toolbar again if required? Basically i want to have the custom toolbar checked on/off based on the config file entry, but still available to the end user so that they can override the default behavior.

regards
srividhya
Posted 02 Jul, 2008 17:46:36 Top
Andrei Smolin


Add-in Express team


Posts: 18794
Joined: 2006-05-11
Hi Srividhya,

I've added Outlook events and, in InspectorActivate, wrote the following code:

            adxOlInspectorCommandBar1.Visible = false;
            adxOlInspectorCommandBar1.Enabled = true;


This hides the commandbar but lefts it available in the View | Toolbars popup menu. Is this what you need?


Andrei Smolin
Add-in Express Team Leader
Posted 04 Jul, 2008 08:14:33 Top