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] Sub Solid() [C#] void Solid(); [C++] void Solid(); [JScript] function Solid();
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;
}
[Visual Basic]
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;
}
IFillFormat Interface | NativeExcel Namespace