This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > SystemUI > ESRI.ArcGIS.SystemUI > Interfaces > IM > IMultiItem Interface > IMultiItem.OnPopup Method (ArcObjects .NET 10.5 SDK) |
Occurs when the menu that contains the multiItem is about to be displayed.
[Visual Basic .NET] Public Function OnPopup ( _ ByVal Hook As Object _ ) As Integer
[C#] public int OnPopup ( object Hook );
[C++]
HRESULT OnPopup(
IDispatch* Hook,
long* ItemCount
);
[C++]
Parameters Hook [in] Hook is a parameter of type IDispatch* ItemCount [out, retval] ItemCount is a parameter of type long
hook is a reference to an IApplication object.
The OnPopup method occurs just before the menu containing the MultiItem is displayed. OnPopup provides a hook to the application object that instantiated the MultiItem and is also used to set the number of items in the MultiItem.
When implementing IMultiItem to create a custom multiItem, use the OnPopup method to get a hook to the application. Also, write code to determine how many items will make up this multiItem and return that number using IMultiItem_OnPopup.