Skip to content

AddPopup Method

Description

Adds a popup MiniToolBar to be displayed as a context menu to the context menus collection.

Syntax

Public Sub AddPopup( _
    ByVal PopupBar As Object _
)

Parameters

  • PopupBar: Reference to a MiniToolBar to be displayed as a context menu.

Remarks

Adds a popup MiniToolBar to be displayed as a context menu to the context menus collection.

Use AddMiniToolBar to create a new MiniToolBar object. After creation, the MiniToolBar needs to be added to the command bars collection of context menus using AddPopup.

PopupMiniToolBar and PopupContextMenu are used to display the MiniToolBar.

Example

Dim MiniToolBar As MiniToolBar  
Set MiniToolBar = CommandBars.AddMiniToolBar("MiniBar")  

CommandBars.ContextMenus.AddPopup MiniToolBar  

With MiniToolBar.Controls  
    Dim Combo As CommandBarComboBox, ComboPopup As CommandBar  
    Set Combo = .Add(xtpControlComboBox, ID_FONT_FACE, "Font Face")  
    Combo.DropDownListStyle = True  
    Combo.Width = 64  
    Combo.Text = "Tahoma"  
    Combo.AutoComplete = True  
    ...  
End With

See Also


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.