Gets or sets the context menu border.
Syntax
Visual Basic (Declaration) | |
---|
Public Property Border As Border |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As ContextMenuStyle
Dim value As Border
instance.Border = value
value = instance.Border |
C# | |
---|
public Border Border {get; set;} |
Example
Press the right mouse button over the row header to see the context menu.
C# | Copy Code |
---|
FarPoint.Web.Spread.ContextMenuStyle stylem = new FarPoint.Web.Spread.ContextMenuStyle();
stylem.Border = new FarPoint.Web.Spread.Border(System.Drawing.Color.Crimson);
FpSpread1.ActiveSheetView.ContextMenuStyle = stylem;
FpSpread1.EnableContextMenu = true;
FarPoint.Web.Spread.ContextMenu rowHeaderContextMenu = new FarPoint.Web.Spread.ContextMenu();
rowHeaderContextMenu.Type = FarPoint.Web.Spread.ContextMenuType.RowHeader;
FarPoint.Web.Spread.MenuItem rowHeaderItem = new FarPoint.Web.Spread.MenuItem("RowHeader item 1");
rowHeaderItem.ChildItems.Add(new FarPoint.Web.Spread.MenuItem("Child item 1"));
rowHeaderItem.ChildItems.Add(new FarPoint.Web.Spread.MenuItem("Child item 2"));
rowHeaderItem.ChildItems[1].Visible = true;
rowHeaderContextMenu.Items.Add(rowHeaderItem);
FpSpread1.ContextMenus.Add(rowHeaderContextMenu); |
VB.NET | Copy Code |
---|
Dim stylem As New FarPoint.Web.Spread.ContextMenuStyle()
stylem.Border = New FarPoint.Web.Spread.Border(System.Drawing.Color.Crimson)
FpSpread1.ActiveSheetView.ContextMenuStyle = stylem
FpSpread1.EnableContextMenu = True
'If the RowHeader context menu has not been added, add it here
Dim rowHeaderContextMenu As New FarPoint.Web.Spread.ContextMenu()
rowHeaderContextMenu.Type = FarPoint.Web.Spread.ContextMenuType.RowHeader
Dim rowHeaderItem As New FarPoint.Web.Spread.MenuItem("RowHeader item 1")
rowHeaderItem.ChildItems.Add(New FarPoint.Web.Spread.MenuItem("Child item 1"))
rowHeaderItem.ChildItems.Add(New FarPoint.Web.Spread.MenuItem("Child item 2"))
rowHeaderItem.ChildItems(1).Visible = True
rowHeaderContextMenu.Items.Add(rowHeaderItem)
FpSpread1.ContextMenus.Add(rowHeaderContextMenu) |
Requirements
Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6
See Also