SpreadJS 14
GC.Spread.Sheets.Shapes Namespace / ShapeBase type / name Method
The name of the shape.
In This Topic
    name Method
    In This Topic
    Gets or sets the name of the shape.
    Syntax
    var instance = new GC.Spread.Sheets.Shapes.ShapeBase();
    var returnValue; // Type: any
    returnValue = instance.name(value);
    function name( 
       value : string
    ) : any;

    Parameters

    value
    The name of the shape.

    Return Value

    If no value is set, returns the name of the shape.
    Example
    var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 62 * 9, 0, 200, 200);
    var shape2 = sheet.shapes.add("myShape2", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 20, 20, 200, 200);
    var shape = sheet.shapes.group([shape1, shape2]);
    shape.name("myGroupShape");
    var shapeName = shape.name();
    See Also

    Reference

    ShapeBase type