NativeExcel for .Net Developer's Reference

ILineFormat.Weight Property

Gets or sets the weight of the specified line in points (1/72 inch).

[Visual Basic]
PropertyWeightAsDouble
[C#]
doubleWeight{get;set;}
[C++]
__propertydoubleget_Weight();
__propertyvoidset_Weight(double);
[JScript]
functiongetWeight():double
functionsetWeight(double);

Property Value

double. The weight of the specified line measured in points (1/72 inch).

Example

This example changes the border's weight for the comment on cell B2

[C#]
IComment comment = book.Worksheets[1].Range["B2"].Comment;
if (comment != null) 
{
    comment.Shape.Line.Weight = 4;
}
[VisualBasic]
Dim comment As IComment = book.Worksheets(1).Range("B2").Comment
If Not comment Is Nothing Then
   comment.Shape.Line.Weight = 4
End If
[C++]
IComment* comment = book->Worksheets->Item[1]->Range->Item[S"B2"]->Comment;
if (comment != null) 
{
   comment->Shape->Line->Weight = 4;
}

See Also

ILineFormat Interface | NativeExcel Namespace