NativeExcel for .Net Developer's Reference

IFillFormat Interface

Represents fill formatting for a shape.

For a list of all members of this type, see IFillFormat Members.

[Visual Basic]
PublicInterfaceIFillFormat
[C#]
publicinterfaceIFillFormat
[C++]
public__gc__interfaceIFillFormat
[JScript]
publicinterfaceIFillFormat

Remarks

Use the Fill property to return an IFillFormat interface.

Example

The following example changes fill color for comment on cell B2.

[C#]
IComment comment = book.Worksheets[1].Range["B2"].Comment;
if (comment != null) 
{
    comment.Shape.Fill.ForeColor.RGB = System.Drawing.Color.FromArgb(0xE0E0FF);
}
[VisualBasic]
Dim comment As IComment = book.Worksheets(1).Range("B2").Comment
If Not comment Is Nothing Then
   comment.Shape.Fill.ForeColor.RGB = System.Drawing.Color.FromArgb(&E0E0FF)
End If
[C++]
IComment* comment = book->Worksheets->Item[1]->Range->Item[S"B2"]->Comment;
if (comment != null) 
{
    comment->Shape->Fill->ForeColor->RGB = System::Drawing::Color::FromArgb(0xE0E0FF);
}

Requirements

Namespace: NativeExcel

Assembly: NativeExcel (in NativeExcel.dll)

See Also

IFillFormat Members | NativeExcel Namespace | IShape.Fill Property | IShape interface