In a custom theme how can I change my default font size

Posted by: adisa.craig on 17 January 2020, 8:26 am EST

    • Post Options:
    • Link

    Posted 17 January 2020, 8:26 am EST

    https://help.grapecity.com/spread/SpreadSheets12/webframe.html#SpreadJS~GC.Spread.Sheets.Theme.html

    I followed this documentation to create a custom theme but it doesn’t show how I can update my default theme font size

    for ex. it shows by default if I get a cell’s font it shows 14.667px Verdana, but I would like it to show 11pt Verdana by default

  • Posted 19 January 2020, 8:49 pm EST

    Hi Adisa,

    The custom theme doesn’t allow to set a default font size, for setting the default font size, please use the setDefaultStyle() method. Please refer to the following code snippet:

    var defaultStyle = new GC.Spread.Sheets.Style();
    defaultStyle.font = "11pt Verdana";
    sheet.setDefaultStyle(defaultStyle);
    

    Regards

    Sharad

Need extra support?

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

Learn More

Forum Channels