Gets or sets the color as an index in the current palette.
[Visual Basic] Property SchemeColor As Integer [C#] int SchemeColor { get; set; } [C++] __property int get_SchemeColor(); __property void set_SchemeColor(int ); [JScript] function get SchemeColor() : int function set SchemeColor(int);
Integer. An index in the current palette.
This example adds a comment to cell B2 and then sets the foreground color for the comment's fill.
[C#]
IRange range = book.Worksheets[1].Range["B2"];
IComment comment = range.AddComment("Comment text");
comment.Shape.Fill.ForeColor.SchemeColor = 31;
comment.Text = String.Format("SchemeColor #31 is equal RGB {0:x6}", comment.Shape.Fill.ForeColor.RGB.ToArgb());
[Visual Basic]
Dim range As IRange = book.Worksheets(1).Range("B2")
Dim comment As IComment = range.AddComment("Comment text")
comment.Shape.Fill.ForeColor.SchemeColor = 31
comment.Text = String.Format("SchemeColor #31 is equal RGB {0:x6}", comment.Shape.Fill.ForeColor.RGB.ToArgb())
[C++]
IRange* range = book->Worksheets->Item[1]->Range->Item[S"B2"];
IComment* comment = range->AddComment(S"Comment text");
comment->Shape->Fill->ForeColor->SchemeColor = 31;
comment->Text = String.Format(S"SchemeColor #31 is equal RGB {0:x6}", comment->Shape->Fill->ForeColor->RGB->ToArgb());
IColorFormat Interface | NativeExcel Namespace | RGB Property | IPalette interface