FlexGrid for WinForms | ComponentOne
C1.Win.C1FlexGrid Namespace / CellBorder Class / HorizontalWidth Property
Example

In This Topic
    HorizontalWidth Property (CellBorder)
    In This Topic
    Gets or sets the horizontal border edges width (except for 3D borders) when Direction is set to BorderDirEnum.BothDifferent.
    Syntax
    'Declaration
     
    
    Public Property HorizontalWidth As Integer
    public int HorizontalWidth {get; set;}
    Remarks

    Used with Direction = BorderDirEnum.BothDifferent only. Customize Width property for other cases.

    Makes sence for Style set to BorderStyleEnum.Flat or BorderStyleEnum.Double only. 3D borders are always one or two pixels wide.

    Example
    Set 3 px bottom border for selected column header cells.

    HorizontalWidth value will be ignored.

    Set wide green bottom border and thin gray side border for selected column header cells.

    var flexGrid = new C1.Win.FlexGrid.C1FlexGrid();
    c1FlexGrid1.Styles.SelectedColumnHeader.Border.Direction = BorderDirEnum.BothDifferent;
    c1FlexGrid1.Styles.SelectedColumnHeader.Border.HorizontalWidth = 3;
    var flexGrid = new C1.Win.FlexGrid.C1FlexGrid();
    c1FlexGrid1.Styles.SelectedColumnHeader.Border.Direction = BorderDirEnum.Both;
    c1FlexGrid1.Styles.SelectedColumnHeader.Border.HorizontalWidth = 3;
    var flexGrid = new C1.Win.FlexGrid.C1FlexGrid();
    c1FlexGrid1.Styles.SelectedColumnHeader.Border.Direction = BorderDirEnum.BothDifferent;
    c1FlexGrid1.Styles.SelectedColumnHeader.Border.VerticalWidth = 1;
    c1FlexGrid1.Styles.SelectedColumnHeader.Border.HorizontalWidth = 3;
    c1FlexGrid1.Styles.SelectedColumnHeader.Border.HorizontalColor = Color.Green;
    c1FlexGrid1.Styles.SelectedColumnHeader.Border.VerticalColor = Color.Gray;
    See Also