tchapin

How to make Add-In button start out disabled

Discussion created by tchapin on Mar 23, 2012
Latest reply on Mar 23, 2012 by kenbuja
I have a button on an Add-in toolbar that I want to start out disabled and only enable it when certain layers are added to the map.  I have implemented code in the button class' OnUpdate() event to do this.  But that code doesn't run until after the button has been clicked.  I want to prevent the button from being clicked in the first place until some condition is met.  How do I make the button disabled to begin with?

Ted Chapin

Outcomes