SpreadJS 14
GC.Spread.Sheets.CellTypes Namespace / Button class / marginRight Method
The button's right margin relative to the cell.
In This Topic
    marginRight Method
    In This Topic
    Gets or sets the button's right margin in pixels relative to the cell.
    Syntax
    var instance = new GC.Spread.Sheets.CellTypes.Button();
    var returnValue; // Type: any
    returnValue = instance.marginRight(value);
    function marginRight( 
       value : number
    ) : any;

    Parameters

    value
    The button's right margin relative to the cell.

    Return Value

    If no value is set, returns the right margin in pixels; otherwise, returns the button cell type.
    Example
    This example creates a button cell and sets its margins.
    var cellType = new GC.Spread.Sheets.CellTypes.Button();
    cellType.buttonBackColor("#FFFF00");
    cellType.text("this is a button");
    cellType.marginTop(5).marginRight(8).marginBottom(10).marginLeft(12);
    activeSheet.getCell(0, 2).cellType(cellType);
    activeSheet.setColumnWidth(2, 120.0,GC.Spread.Sheets.SheetArea.viewport);
    activeSheet.setRowHeight(0, 90.0,GC.Spread.Sheets.SheetArea.viewport);
    Remarks
    The default value is 2 pixels.
    See Also

    Reference

    Button class