I have a toolbar with two buttons that allow users to display an edit attribute window of a selected feature. I would like the buttons to be disabled until the user selects one feature.
Current, I somewhat have this feature working. The button is enable whened opening the document and then it is disabled after the first time opening the window (I have it in the OnUpdate Event). How can I change this so that the button is disabled when the user opens the MXD and then is enable when only one feature is selected?
I think my problem is just that i have it in the OnUpdate event?? Using Visual Basic 2008 Express, ArcGIS 10
Protected Overrides Sub OnUpdate() Dim pFeatLyr As IFeatureLayer pFeatLyr = GetLayerByTOC("AJ_RecommendedImprovementsLines") 'Enable Button If GetFeatSelCount(pFeatLyr) = 1 Then Me.Enabled = True Else Me.Enabled = False End If End Sub