I have created a toolbar for ArcGIS 10.3 using ArcObjects .NET10.3 c#.
It has couple of buttons and a tool. I want to set a global variable before any of these buttons and tools are created.
How can I do it.
Could you describe the variable you're needing to set? If these buttons/tools are within the same project you could create a global variable within their source code and initialize it within the constructor of the buttons/tools.
I want to add a check that if Vector Layer Edit Mode is ON, enable all the buttons. By default I want the buttons to be disabled. Also, when the editing is done and mode is changed (Not Editing), I want to disable all the buttons.
Have you tried modifying the Enabled property of the button using your logic to check if the editor is active within the OnUpdate method of the button.
I am doing the same and it works.
But I have to do it for all the buttons on a toolbar separately. I was wondering if we can do it for the Group and Set and Get the status by using some global Static Variable.
Also, I want to know if there is an order or 'initialization' if I create multiple buttons and tools in a toolbar.
Retrieving data ...