GrapeCity MultiRow Windows Forms Documentation
Setting Shapes (ShapeCell)

You can use the ShapeCell.Renderer property to set shapes in a shape cell. This section describes how to set shapes.

Setting Shapes using the Designer

  1. Select the shape cell in which you want to set the shape (for example: shapeCell1).
  2. Select the Renderer property in the Properties window, and select Pentagon from the drop-down list.

    Setting Shapes

  3. Expand the Renderer class by clicking the "+" sign at the left of the Renderer property.
  4. Change the following properties of the Renderer class:
    • Set the ArrowLength property to 30.
    • Set the Direction property to Top
    • Set the LineWidth property to 3.

Using Code

The following example creates a shape cell.

[VB]

Imports GrapeCity.Win.MultiRow 
Dim pentagonShapeRenderer1 = New PentagonShapeRenderer() 
pentagonShapeRenderer1.ArrowLength = 30 
pentagonShapeRenderer1.Direction = ShapeDirection.Top 
pentagonShapeRenderer1.LineWidth = 3 
Dim shapeCell1 = New ShapeCell() 
shapeCell1.Name = "shapeCell1" 
shapeCell1.Renderer = pentagonShapeRenderer1 
GcMultiRow1.Template = Template.CreateGridTemplate(New Cell() {shapeCell1}) 
GcMultiRow1.RowCount = 10

[CS]

using GrapeCity.Win.MultiRow; 
PentagonShapeRenderer pentagonShapeRenderer1 = new PentagonShapeRenderer(); 
pentagonShapeRenderer1.ArrowLength = 30; 
pentagonShapeRenderer1.Direction = ShapeDirection.Top; 
pentagonShapeRenderer1.LineWidth = 3; 
ShapeCell shapeCell1 = new ShapeCell(); 
shapeCell1.Name = "shapeCell1"; 
shapeCell1.Renderer = pentagonShapeRenderer1; 
gcMultiRow1.Template = Template.CreateGridTemplate(new Cell[] { shapeCell1 }); 
gcMultiRow1.RowCount = 10;

See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options