NativeExcel for .Net Developer's Reference

IFillFormat.SolidMethod

Sets the specified fill to a uniform color. Use this method to convert a gradient, textured, patterned, or background fill back to a solid fill.

[Visual Basic]
SubSolid()
[C#]
voidSolid();
[C++]
voidSolid();
[JScript]
functionSolid();

Example

This example converts fill on comment to default comment's fill.

[C#]
IComment comment = book.Worksheets[1].Range["B2"].Comment;
if (comment != null) 
{
    comment.Shape.Fill.Visible = true;
    comment.Shape.Fill.Solid();  
    //default background color for the comments
    comment.Shape.Fill.ForeColor.SchemeColor = 80;
}
[VisualBasic]
Dim comment As IComment = book.Worksheets(1).Range("B2").Comment
If Not comment Is Nothing Then
   comment.Shape.Fill.Visible = True
   comment.Shape.Fill.Solid()  
   'default background color for the comments
   comment.Shape.Fill.ForeColor.SchemeColor = 80
End If
[C++]
IComment* comment = book->Worksheets->Item[1]->Range->Item[S"B2"]->Comment;
if (comment != null) 
{
    comment->Shape->Fill->Visible = false;
    comment->Shape->Fill->Solid();  
    //default background color for the comments
    comment->Shape->Fill->ForeColor->SchemeColor = 80;
}

See Also

IFillFormat Interface | NativeExcel Namespace