Spread for ASP.NET 9.0 Product Documentation
ItemHoverBorder Property
Example 


Gets or sets the item hover border.
Syntax
'Declaration
 
Public Property ItemHoverBorder As Border
'Usage
 
Dim instance As ContextMenuStyle
Dim value As Border
 
instance.ItemHoverBorder = value
 
value = instance.ItemHoverBorder
public Border ItemHoverBorder {get; set;}

Property Value

The item hover border.
Example
This example uses the ItemHoverBorder property.
protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack) return;
            FpSpread1.ActiveSheetView.ContextMenuStyle.ItemHoverBackColor = System.Drawing.Color.FromArgb(88, 149, 77);
            FpSpread1.ActiveSheetView.ContextMenuStyle.Seperator = new FarPoint.Web.Spread.Border(BorderStyle.Dotted, System.Drawing.Color.Red, 2);
            FpSpread1.ActiveSheetView.ContextMenuStyle.ItemHoverBorder = new FarPoint.Web.Spread.Border(BorderStyle.Dashed, System.Drawing.Color.Aqua, 2);
            FpSpread1.ActiveSheetView.ContextMenuStyle.ItemFont.Bold = true;            
            FarPoint.Web.Spread.ContextMenu viewportMenu = new FarPoint.Web.Spread.ContextMenu();
            viewportMenu.Type = FarPoint.Web.Spread.ContextMenuType.Viewport;
            FarPoint.Web.Spread.MenuItem customViewportItem = new FarPoint.Web.Spread.MenuItem("Viewport item 1");
            customViewportItem.ChildItems.Add(new FarPoint.Web.Spread.MenuItem(" First Item"));
            customViewportItem.ChildItems.Add(new FarPoint.Web.Spread.MenuItem("-"));
            customViewportItem.ChildItems.Add(new FarPoint.Web.Spread.MenuItem(" Second Item"));
            viewportMenu.Items.Add(customViewportItem);
            FpSpread1.EnableContextMenu = true;
            FpSpread1.ContextMenus.Add(viewportMenu);
        }
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If (IsPostBack) Then
            Return
        End If        
        FpSpread1.ActiveSheetView.ContextMenuStyle.ItemHoverBackColor = System.Drawing.Color.FromArgb(88, 149, 77)
        FpSpread1.ActiveSheetView.ContextMenuStyle.Seperator = New FarPoint.Web.Spread.Border(BorderStyle.Dotted, System.Drawing.Color.Red, 2)
        FpSpread1.ActiveSheetView.ContextMenuStyle.ItemHoverBorder = New FarPoint.Web.Spread.Border(BorderStyle.Dashed, System.Drawing.Color.Aqua, 2)
        FpSpread1.ActiveSheetView.ContextMenuStyle.ItemFont.Bold = True
        Dim viewportMenu As New FarPoint.Web.Spread.ContextMenu()
        viewportMenu.Type = FarPoint.Web.Spread.ContextMenuType.Viewport
        Dim customViewportItem As New FarPoint.Web.Spread.MenuItem("Viewport item 1")
        customViewportItem.ChildItems.Add(New FarPoint.Web.Spread.MenuItem(" First Item"))
        customViewportItem.ChildItems.Add(New FarPoint.Web.Spread.MenuItem("-"))
        customViewportItem.ChildItems.Add(New FarPoint.Web.Spread.MenuItem(" Second Item"))
        viewportMenu.Items.Add(customViewportItem)
        FpSpread1.EnableContextMenu = True
        FpSpread1.ContextMenus.Add(viewportMenu)
End Sub
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.