FlexGrid for WinForms | ComponentOne
C1.Win.FlexGrid Namespace / C1FlexGridBase Class / MarqueeStyle Property
Example

In This Topic
    MarqueeStyle Property (C1FlexGridBase)
    In This Topic
    Gets or sets a set of properties that control the appearance of Marquee border.
    Syntax
    'Declaration
     
    
    Public ReadOnly Property MarqueeStyle As MarqueeStyle
    public MarqueeStyle MarqueeStyle {get;}
    Remarks

    This property determines the appearance of solid marquee border that is drawn around the selected cell range. To set up the appearance of selected cells use Styles["Highlight"] style.

    When SelectionMode is set to SelectionModeEnum.MultiRange only backround padding will be drawn.

    To set the focus rectangle type use the FocusRect property. To set up the focused cell appearance use Styles["Focus"] style.

    This property is themeable. Set needed values to subnodes of the c1theme template node to customize it.

    Example

    By default marquee border is not shown. Turn it on with changing the C1.Win.FlexGrid.Util.Styles.MarqueeStyle.BorderMode property. It will draw 1px-width black solid line inside the selected range borders without padding for cell's background.

    Set Office365 theme-like border.

    var flexGrid = new C1.Win.FlexGrid.C1FlexGrid();
    flexGrid.MarqueeStyle.BorderMode = MarqueeBorderMode.CellRange;
    var flexGrid = new C1.Win.FlexGrid.C1FlexGrid();
    flexGrid.MarqueeStyle.BackgroundPadding = new Padding(1);
    flexGrid.MarqueeStyle.BackgroundPaddingColor = flexGrid.Styles.Normal.BackColor;
    flexGrid.MarqueeStyle.BorderAlign = BorderAlign.Outside;
    flexGrid.MarqueeStyle.BorderMode = MarqueeBorderMode.CellRange;
    flexGrid.MarqueeStyle.Color = Color.Green;
    flexGrid.MarqueeStyle.Width = 1;
    flexGrid.FocusRect = FocusRectEnum.None
    See Also