This document is archived and information here might be outdated.  Recommended version.


IMultiItem.OnPopup Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (SystemUI)  

IMultiItem.OnPopup Method

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

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

hook is a reference to an IApplication object.

Remarks

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. 

See Also

IMultiItem Interface | IApplication Interface