Hi,
I have the proper code in my Add In to disable a button, but it only actually gets disabled after I try to click on it for the first time:
public AttributeUpdate()
{
editorUID.Value = "esriEditor.Editor";
Global.m_editor = ArcMap.Application.FindExtensionByCLSID(editorUID) as IEditor3;
}
protected override void OnUpdate()
{
Enabled = Global.m_editor.EditState != esriEditState.esriStateNotEditing;
}
Do I need to do something to for the 'OnUpdate' when the tool first loads?? I thought it would all happen automatically.
When ArcMap first starts the tool is enabled. Only after clicking on it will the 'OnUpdate' code start kicking in.
Thanks,