NativeExcel2 for .Net Developer's Reference

IShape.Width Property

Gets or sets the width of the shape in points (1/72 inch).

[Visual Basic]
PropertyWidthAsDouble
[C#]
doubleWidth{get;set;}
[C++]
__propertydoubleget_Width();
__propertyvoidset_Width(double);
[JScript]
functiongetWidth():double
functionsetWidth(double);

Property Value

double. The width of the specified shape measured in points (1/72 inch).

Example

This example sets the width of the comment for cell E5.

[C#]
   IRange cell = book.Worksheets[1].Range["E5"]; 
   cell.AddComment().Shape.Width = 100;  
[VisualBasic]
   Dim cell As IRange
   cell = book.Worksheets(1).Range("E5") 
   cell.AddComment().Shape.Width = 100
[C++]
   IRange* cell;
   cell = book->Worksheets->Item[1]->Range->Item[S"E5"];
   cell->AddComment()->Shape->Width = 100;

See Also

IShape Interface | NativeExcel Namespace | IShape.Height Property