Spread for ASP.NET 9.0 Product Documentation
ItemDisabledBackColor Property
Example 


Gets or sets the backcolor of the disabled item.
Syntax
'Declaration
 
Public Property ItemDisabledBackColor As Color
'Usage
 
Dim instance As ContextMenuStyle
Dim value As Color
 
instance.ItemDisabledBackColor = value
 
value = instance.ItemDisabledBackColor
public Color ItemDisabledBackColor {get; set;}

Property Value

The backcolor.
Example
This example sets the ItemDisabledBackColor property.
FarPoint.Web.Spread.ContextMenuStyle stylem = new FarPoint.Web.Spread.ContextMenuStyle();
stylem.BackColor = System.Drawing.Color.Aqua;
stylem.ItemBackColor = System.Drawing.Color.Beige;
stylem.ItemDisabledForeColor = System.Drawing.Color.Red;
stylem.ItemDisabledBackColor = System.Drawing.Color.Green;
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;
rowHeaderItem.ChildItems[1].Enabled = false;
rowHeaderContextMenu.Items.Add(rowHeaderItem);
FpSpread1.ContextMenus.Add(rowHeaderContextMenu); 
Dim stylem As New FarPoint.Web.Spread.ContextMenuStyle()
stylem.BackColor = System.Drawing.Color.Aqua
stylem.ItemBackColor = System.Drawing.Color.Beige
stylem.ItemDisabledForeColor = System.Drawing.Color.Red
stylem.ItemDisabledBackColor = System.Drawing.Color.Green
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
rowHeaderItem.ChildItems(1).Enabled = False
rowHeaderContextMenu.Items.Add(rowHeaderItem)
FpSpread1.ContextMenus.Add(rowHeaderContextMenu)
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

ContextMenuStyle Class
ContextMenuStyle Members

 

 


Copyright © GrapeCity, inc. All rights reserved.