NativeExcel2 for .Net Developer's Reference

IShape.Fill Property

Gets an IFillFormat interface that contains fill formatting properties for the specified shape.

[Visual Basic]
PropertyReadOnlyFillAsIFillFormat
[C#]
IFillFormatFill{get;}
[C++]
__propertyIFillFormat*get_Fill();
[JScript]
functiongetFill():IFillFormat

Property Value

IFillFormat interface.

Example

This example creates new comment with a green background.

[C#]
IWorksheet sheet = book.Worksheets[1];
IComment comment = sheet.Cells[5,5].AddComment("comment text");
comment.Shape.Fill.Visible = true; 
comment.Shape.Fill.Solid(); 
comment.Shape.Fill.ForeColor.RGB = System.Drawing.Color.FromArgb(0x00E000); 
[VisualBasic]
Dim sheet As IWorksheet = book.Worksheets(1)
Dim comment As IComment = sheet.Cells(5,5).AddComment("comment text")
comment.Shape.Fill.Visible = True
comment.Shape.Fill.Solid() 
comment.Shape.Fill.ForeColor.RGB = System.Drawing.Color.FromArgb(&H00E000) 
[C++]
IWorksheet* sheet = book->Worksheets->Item[1]; 
IComment* comment = sheet->Cells->Item[5,5]->AddComment(S"comment text");
comment->Shape->Fill->Visible = true; 
comment->Shape->Fill->Solid(); 
comment->Shape->Fill->ForeColor->RGB = System::Drawing::Color::FromArgb(0x00E000); 

See Also

IShape Interface | NativeExcel Namespace