Type | Description | |||
Boolean | A boolean value indicating whether the item contains a sub menu. |
If the item contains no sub menu, the Popup property retrieves False. If the Popup retrieves True, the SubMenu property gets the item's submenu. Use the Add method to insert a sub menu. Use the Popup property to convert on the fly a regular item to a popup item. Use the ShowDown property to specify whether the popup menu should show up or down.
The following VB sample shows adds items to a menu of popup type:
With ExMenu1.Items Dim i As Item Set i = .Add("Popup", , 1234) i.Popup = True With i.SubMenu .Add("Child").Image = 1 End With End With ExMenu1.Refresh
The following C++ sample adds items to a menu of popup type:
COleVariant vtMissing; V_VT( &vtMissing ) = VT_ERROR; CItem item = m_menu.GetItems().Add( "Popup", vtMissing, COleVariant( (long)1234 ) ); item.SetPopup( TRUE ); item.GetSubMenu().Add( "Child 1", vtMissing , vtMissing ).SetImage( 1 ); m_menu.Refresh();
The following VB.NET sample adds items to a menu of popup type:
With AxExMenu1.Items Dim i As EXMENULib.item = .Add("Popup", , 1234) i.Popup = True With i.SubMenu .Add("Child").Image = 1 End With End With AxExMenu1.CtlRefresh()
The following C# sample adds items to a menu of popup type:
EXMENULib.item item = axExMenu1.Items.Add("Popup",null, 1234); item.Popup = true; EXMENULib.Menu subMenu = item.SubMenu; subMenu.Add("Child 1", null, null).Image = 1; axExMenu1.CtlRefresh();
The following VFP sample adds items to a menu of popup type:
With thisform.ExMenu1.Items with .Add("Popup", , 1234) .Popup = .t. With .SubMenu .Add("Child").Image = 1 EndWith endwith EndWith thisform.ExMenu1.Object.Refresh