Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am developing a custom extension for ArcMAP in Arcgis 10, and would like to display my Custom Toolbar automatically instead of having the user to select it from the customize window. Is this possible?

Further more is it possible to hide the toolbar, when the extension is switched off from the Extensions window?

share|improve this question
1  
see also this thread. –  Kirk Kuykendall Apr 11 '12 at 22:00
add comment

2 Answers

up vote 3 down vote accepted

To complement @Kirk's answer, to show and hide the toolbar, you can try using ICommandBar.Dock and use the esriDockToggle constant (64) from the esriDockFlags enumeration to toggle its visibility. Have not tried this myself so if it doesn't work try some of the other constants.

share|improve this answer
    
While Kirk's answer was helpful, you answer about using ICommandBar.Dock, was what actually what I was looking for. –  Devdatta Tengshe Apr 13 '12 at 3:34
add comment

I think this can be done in your implementation of the setter for IExtensionConfig.State. Since this gets called before the doc opens (and before the toolbar collection is initialized) your extension might need to listen to IDocumentEvents.OpenDocument and NewDocument. Accessing IDocument.Toolbars before one of these events has fired can cause problems.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.