Posted 10 October 2022, 8:52 pm EST - Updated 10 October 2022, 8:57 pm EST
Hi admin,
- I want to fix the icon of the calendar, instead of default please help me.
Thanks,
Forums Home / Spread / SpreadJS
Posted by: nguyentuyen1322 on 10 October 2022, 8:52 pm EST
Posted 10 October 2022, 8:52 pm EST - Updated 10 October 2022, 8:57 pm EST
Hi admin,
Thanks,
Posted 12 October 2022, 2:53 pm EST
Hi,
For CellButtons, SpreadJS offers a number of customization options. When defining the CellButton, you can specify a custom image, height, width, location, buttonBackColor, etc.
You can use the example I made for you below as a guide. I’ve specified a unique imageSrc for the button in the example: https://jscodemine.grapecity.com/share/L1AQZK9m40OrPrDrGLpA9g/
You can refer to the ICellButton interface for various customizations available.
[code] export interface ICellButton{ position?: GC.Spread.Sheets.ButtonPosition; useButtonStyle?: boolean; enabled?: boolean; width?: number; caption?: string; imageSrc?: string; imageSize?: { width: number, height: number }; captionAlign?: GC.Spread.Sheets.CaptionAlignment; command?: string | ((sheet: GC.Spread.Sheets.Worksheet, row: number, col: number, option: any) => void); imageType?: GC.Spread.Sheets.ButtonImageType; visibility?: GC.Spread.Sheets.ButtonVisibility; hoverBackColor?: string; buttonBackColor?: string; }[/code]
API References:
ButtonImageType Enumeration: https://www.grapecity.com/spreadjs/api/enums/GC.Spread.Sheets.ButtonImageType#enumeration-buttonimagetype
cellButtons Style: https://www.grapecity.com/spreadjs/api/classes/GC.Spread.Sheets.Style#cellbuttons
Regards,
Ankit