Hide / show toolbar

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

Hide / show toolbar
 
Thomas Grossen




Posts: 134
Joined: 2005-10-21
Hello,

I would like to hide / show my toolbar in certain conditions. It is strange that even I set the Visible property to false, my toolbar is always displayed.

I read that in the VCL version of ADX, they is an OnBeforeAdd event with a cancel argument that permit to cancel the display of a toolbar (Topic). I did not find this event in my .NET version.

What is the solution? Do I need to create the toolbar programmatically in the AddinModule_AddinInitialize event?

Thank you.
Thomas.
Posted 27 Feb, 2006 08:19:37 Top
Sergey Grischenko


Add-in Express team


Posts: 7234
Joined: 2004-07-05
Thomas, what Office application do you develop an add-in for?
Posted 27 Feb, 2006 08:30:56 Top
Thomas Grossen




Posts: 134
Joined: 2005-10-21
Sorry,

I am developping an Outlook Add-in. But the hide or Show toolbar is depending if Word is the email editor.

Thanks.

Thomas
Thomas.
Posted 27 Feb, 2006 08:33:46 Top
Sergey Grischenko


Add-in Express team


Posts: 7234
Joined: 2004-07-05
Do you use the InspectorActivate event handler to show/hide the command bar?
Posted 27 Feb, 2006 08:45:03 Top
Thomas Grossen




Posts: 134
Joined: 2005-10-21
No. Actually I just tried to show / hide setting the Visible property to true or false at design time, but it does not work; the toolbar is always visible.

I also tried to set the property in the adxOutlookEvents_NewInspector event, but it is the same problem.

It works to hide or show Specifics Item on the toolbar, but not the whole toolbar.

Thomas.
Thomas.
Posted 27 Feb, 2006 08:52:38 Top
Sergey Grischenko


Add-in Express team


Posts: 7234
Joined: 2004-07-05
Thomas, the point is that ADX manages ADXOlExplorerCommandBar and ADXOlInspectorCommandBar components via the ItemTypes property. You need to use the InspectorActivate event handler to hide/show command bars manually in the code.
Posted 27 Feb, 2006 09:02:46 Top
Thomas Grossen




Posts: 134
Joined: 2005-10-21
ok, I understand. It worked.

Thanks again :)

Thomas.
Thomas.
Posted 27 Feb, 2006 09:08:49 Top