How do I disable the resizing of rounded corners in shapes?

Posted by: Fabrice.Mainguene on 10 June 2026, 9:12 am EST

    • Post Options:
    • Link

    Posted 10 June 2026, 9:12 am EST

    Hi,

    I have this code:

    var activeSheet=Utils.spread.getActiveSheet();
    var shape=activeSheet.shapes.add('0400000082', GC.Spread.Sheets.Shapes.AutoShapeType.roundedRectangle, 0, 0, 1, 1);
    
    var oldStyle = shape.style();
    oldStyle.fill.color = '#D13438';
    oldStyle.textEffect.color = '#FFFFFF';
    oldStyle.textEffect.font = '11px Arial';
    oldStyle.textFrame.vAlign = GC.Spread.Sheets.VerticalAlign.center;
    oldStyle.textFrame.hAlign = GC.Spread.Sheets.HorizontalAlign.center;
    oldStyle.line.lineStyle = GC.Spread.Sheets.Shapes.PresetLineDashStyle.solid;
    oldStyle.line.color = 'grey';
    oldStyle.line.width = 0;
    oldStyle.line.capType=GC.Spread.Sheets.Shapes.LineCapStyle.square; 
    oldStyle.line.joinType=GC.Spread.Sheets.Shapes.LineJoinStyle.miter; 
    oldStyle.line.compoundType = GC.Spread.Sheets.Shapes.CompoundType.double;
    oldStyle.line.transparency = 0.9;
    shape.style(oldStyle);
    
    shape.allowMove(false);
    shape.allowResize(false);
    shape.allowRotate(false);
    shape.isLocked(false);
    shape.text('test');
    
    shape.startRowOffset(0);
    shape.startColumnOffset(0); 
    shape.endRowOffset(0);
    shape.endColumnOffset(0);
    
    shape.startRow(8); 
    shape.startColumn(2);
    shape.endRow(10); 
    shape.endColumn(3);

    Despite the setting shape.allowResize(false);, I still see the little square for resizing the corners.

    How to hide this this resize handle?

  • Posted 11 June 2026, 2:15 am EST

    Hi,

    As per our understanding, you would like to hide the resize handles (corner handles) of a shape.

    You can achieve this by using the “showHandle” API and passing “false” as the parameter. This will hide the resize handles. Refer to the following code snippet:

    shape.showHandle(false);
    

    Reference:

    Regards,

    Priyam

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels