# Creating a Complex Border with Multiple Lines

Learn how to create multi-line cell borders using the CompoundArray property of the ComplexBorderSide class with code examples in C# and VB.

## Content

You can create a cell border with multiple lines using the complex border.

## Using Code

Use the **CompoundArray** property of the [ComplexBorderSide](/spreadnet/api/latest/online-win/FarPoint.Win/FarPoint.Win.ComplexBorderSide.html) class to create multiple-line borders for a cell.
Review the following examples for more information.
**Example**
This example code creates a ComplexBorderSide that has two underlines (two lines with a blank space in between) each taking a third of the width of the pen.
![Compound Array Diagram for Two Lines](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/compoundarray01.png)

```csharp
// Create a new complex border side with two lines.
FarPoint.Win.ComplexBorderSide bottomborder = new FarPoint.Win.ComplexBorderSide(true, Color.Black, 3, System.Drawing.Drawing2D.DashStyle.Solid, null, new Single[] {0f, 0.33f, 0.66f, 1f});
fpSpread1.Sheets[0].Cells[3, 7].Border = new FarPoint.Win.ComplexBorder(null, null, null, bottomborder);
```

```vbnet
' Create a new complex border side with two lines.
Dim bottomborder As New FarPoint.Win.ComplexBorderSide(Color.Black, 3, System.Drawing.Drawing2D.DashStyle.Solid, Nothing, New Single() {0, 0.33, 0.66, 1})
fpSpread1.Sheets(0).Cells(3, 7).Border = New FarPoint.Win.ComplexBorder(Nothing, Nothing, Nothing, bottomborder)
```

**Example**
This example code creates a ComplexBorderSide that has three lines with varying amounts of thickness and with some blank space on either edge of the pen.
![Compound Array Diagram for Three Lines](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/compoundarray02.png)

```csharp
// Create a new complex border side with three lines.
FarPoint.Win.ComplexBorderSide bottomborder = new FarPoint.Win.ComplexBorderSide(true, Color.Black, 3, System.Drawing.Drawing2D.DashStyle.Solid, null, new Single[] {0.1f, 0.2f, 0.3f, 0.6f, 0.7f, 0.9f});
fpSpread1.Sheets[0].Cells[3, 7].Border = new FarPoint.Win.ComplexBorder(null, null, null, bottomborder);
```

```vbnet
' Create a new complex border side with three lines.
Dim bottomborder As New FarPoint.Win.ComplexBorderSide(True, Color.Black, 3, System.Drawing.Drawing2D.DashStyle.Solid, Nothing, New Single() {0.1, 0.2, 0.3, 0.6, 0.7, 0.9})
fpSpread1.Sheets(0).Cells(3, 7).Border = New FarPoint.Win.ComplexBorder(Nothing, Nothing, Nothing, bottomborder)
```

## See Also

[Customizing the Outline of the Component](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearcell/spwin-appearcontrolborder)
[Displaying Grid Lines on a Sheet](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearcell/spwin-sheetgridcolor)
[Creating and Customizing Cell Borders](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearcell/spwin-cellborder)