Version

HtmlBoxMenu Class

Represents a menu.
Syntax
'Declaration
 
Public Class HtmlBoxMenu 
   Inherits BaseChildControl
public class HtmlBoxMenu : BaseChildControl 
Remarks

A single instance of HtmlBoxMenu object is tied to each instance of ToolbarMenuButton on the toolbar. When a button of this type is clicked, the menu represented by the HtmlBoxMenu object is displayed. In addition, another instance of HtmlBoxMenu is used to represent the right-click menu (exposed by the WebHtmlEditor.RightClickMenu property) which is displayed when the user right-clicks on the WebHtmlEditor.

There are two scenarios for creating/using menus:

  • Predefined menus: These types of menus are either tied to predefined toolbar buttons or are used as the right-click menu. For example, if you add a ToolbarDialogButton with a ToolbarMenuButton.Type == ToolbarMenuButtonType.InsertTable, a predefined table formatting HtmlBoxMenu will be tied to the ToolbarMenuButton (and exposed as the ToolbarMenuButton.Menu property). Typically, you won't want want to modify the actual content of the menu, but instead would modify the look and feel of the menu using properties such as BackColor or ImageColumnColor.
  • Custom menus: These types of menus are tied to custom toolbar buttons. For example, if you add a ToolbarMenuButton with a ToolbarMenuButton.Type == ToolbarMenuButtonType.Custom, an HtmlBoxMenu would be tied to the ToolbarMenuButton (and exposed as the ToolbarMenuButton.Menu property). However, this menu would be empty until some content was supplied for the menu. This is done by adding items to the ToolbarMenuButton.Menu.Items collection.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also