Add an Extension along with your button. Here is the code example:import arcpy
import pythonaddins
class ButtonClass1(object):
"""Implementation for StopStartEdits_addin.button (Button)"""
def __init__(self):
self.enabled = True
self.checked = False
def onClick(self):
# your button event logic is here
class ExtensionClass2(object):
"""Implementation for StopStartEdits_addin.extension3 (Extension)"""
def __init__(self):
# For performance considerations, please remove all unused methods in this class.
self.enabled = True
def onStartEditing(self):
button.enabled = False
def onStopEditing(self, save_changes):
button.enabled = True
The button gets disabled when the user clicks Start Editing and is enabled when the user selects Stop Editing. Enable/Disable is just for example but you can do whatever you want to.