Called periodically by the framework once the combo box has been created.

Namespace:  ESRI.ArcGIS.Desktop.AddIns

Assembly:  ESRI.ArcGIS.Desktop.Addins (in ESRI.ArcGIS.Desktop.Addins.dll) Version: 10.0.0.0 (10.0.0.0)

Syntax

C#
protected virtual void OnUpdate()
Visual Basic (Declaration)
Protected Overridable Sub OnUpdate
Visual C++
protected:
virtual void OnUpdate()

Remarks

The OnUpdate method is called periodically by the framework once the control has been created. This provides an opportunity to run some code periodically within your customization. One typical use of OnUpdate is to determine and set the Enabled property of the control. Note that as OnUpdate is called frequently you should avoid lengthy operations in this method, as this would reduce the responsiveness of the application user interface.

Examples

The example code below shows OnUpdate only does a simple check.
CopyC#
protected override void OnUpdate()
{
  this.Enabled = ArcMap.Application != null;
}
CopyVB.NET
Protected Overloads Overrides Sub OnUpdate()
  Me.Enabled = ArcMap.Application IsNot Nothing
End Sub

See Also