Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Description

Excerpt

A Border object represents a border around a cell or area of cells.

Signature
C#
C#
[DefaultMember("Item")]
 public sealed class Border
{signature}{signature:
}
Signature
vb.net
vb.net
<DefaultMember("Item")> _
	Public NotInheritable Class Border
{signature}
{remarks}To set a border around a single cell, set the [Border.Color|Border.Color] and [Border.Style|Border.Style] of a {{Border}} object retrieved through the cell's [Style|Style]:
{code:csharp}
Remarks

To set a border around a single cell, set the Border.Color and Border.Style of a Border object retrieved through the cell's Style:

Code Block
csharp
csharp

cellB2.Style.Border.Style = Border.LineStyle.Thick;
{code} {code:csharp}
Code Block
csharp
csharp

cellB2.Style.Border.Color = Palette.SystemColor.Blue;
{code}

You

can

also

define

part

of

a

cell's

border

using

[

Border.Item(Border.Part)

]

:

{

Code Block
}

cellB2.Style.Border[Border.Part.Outline].Color = Palette.SystemColor.Blue;
{code}

To

return

a

{{

Border

}}

object

for

an

[

Area

]

,

use

[

Area.BorderAround

|Area.BorderAround]. {remarks} {example}{code:csharp|title=C#}

.

Example
Code Block
csharp
csharp
titleC#


          ExcelApplication xla = new ExcelApplication();
          Workbook wb = xla.Create();
          Worksheet ws = wb[0];
          Area a = ws.CreateArea(4, 4, 15, 6);
          Border b = a.BorderAround;
        
{code} {code:
Code Block
vb.net
|title=
vb.net
titlevb.net
}


          Dim xla As New ExcelApplication()
          Dim wb As Workbook = xla.Create()
          Dim ws As Worksheet = wb(0)
          Dim a As Area = ws.CreateArea(4, 4, 15, 6)
          Dim b As Border = a.BorderAround
        
{code} {example} {properties} ||Name||Description|| |[Color|Border.Color]|{excerpt-include:Border.Color|nopanel=true}| |[Style|Border.Style]|{excerpt-include:Border.Style|nopanel=true}| {indexers} ||Name||Description|| |[
Properties

Name

Description

Color

Excerpt Include
Border.Color
Border.Color
nopaneltrue

Style

Excerpt Include
Border.Style
Border.Style
nopaneltrue
Indexers

Name

Description

Item(Border.Part)

...

Excerpt Include
Border.Item(Border.Part)

...

Border.Item(Border.Part)

...

nopanel

...

true
Classes

Name

Description

LineStyle

Excerpt Include
Border.LineStyle
Border.LineStyle
nopaneltrue

Part

Excerpt Include
Border.Part
Border.Part
nopaneltrue
Scrollbar