You can also add gradient effects to emphasize the comments blocks by applying fill-color and patterns.
To add the gradient effects, use the Fill property of the IShapeBase interface.
C# |
Copy Code
|
---|---|
fpSpread1.Features.EnhancedShapeEngine = true; IWorksheet TestActiveSheet = fpSpread1.AsWorkbook().ActiveSheet; IShape shape; shape = TestActiveSheet.Cells["A1"].AddComment("InsetPen = false").Shape; TestActiveSheet.Cells["A1"].Comment.Visible = true; shape.Fill.OneColorGradient(GrapeCity.Spreadsheet.Drawing.GradientStyle.FromCenter, 1, 1); shape.Fill.GradientStops.Delete(0); shape.Fill.GradientStops.Delete(0); shape.Fill.GradientStops.Delete(0); shape.Fill.GradientStops.Insert(0xffff00, 0); shape.Fill.GradientStops.Insert(0xffffff, 0.5); shape.Fill.GradientStops.Insert(0x00ffff, 1); shape.Fill.GradientStops[0].Color.SchemeColor = 23; shape.Fill.PathShadeType = GrapeCity.Drawing.PathShadeType.Shape; IShape aa = fpSpread1.AsWorkbook().ActiveSheet.Cells["A1"].Comment.Shape; |
VB |
Copy Code
|
---|---|
FpSpread1.Features.EnhancedShapeEngine = True Dim shape As IShape Dim TestActiveSheet As IWorksheet = FpSpread1.AsWorkbook().ActiveSheet shape = TestActiveSheet.Cells("A1").AddComment("InsetPen = false").Shape TestActiveSheet.Cells("A1").Comment.Visible = True shape.Fill.OneColorGradient(GrapeCity.Spreadsheet.Drawing.GradientStyle.FromCenter, 1, 1) shape.Fill.GradientStops.Delete(0) shape.Fill.GradientStops.Delete(0) shape.Fill.GradientStops.Delete(0) shape.Fill.GradientStops.Insert(&Hffff00, 0) shape.Fill.GradientStops.Insert(&HfffffF, 0.5) shape.Fill.GradientStops.Insert(&H00fffF, 1) shape.Fill.GradientStops(0).Color.SchemeColor = 23 shape.Fill.PathShadeType = GrapeCity.Drawing.PathShadeType.Shape Dim aa As IShape = FpSpread1.AsWorkbook().ActiveSheet.Cells("A1").Comment.Shape |
You can add or manipulate effects at run time via the Fill Effects dialog. The Fill Effects dialog provides options like colors, variants, shading styles, patterns, and a sample preview to view the used gradient effect.
To add an effect to a comment block, select the comment on the sheet at runtime and use the keyboard shortcut key combination "Ctrl+1". This will invoke the Format Comment dialog box. Navigate to Colors and Lines tab and select the Fill Effects option from the Color picker dropdown.
To view comments and add gradient effects to the block in the Spread Designer, follow below mentioned steps: