About the ribbon of spread.net v17

Posted by: 8166582 on 13 May 2024, 7:52 pm EST

    • Post Options:
    • Link

    Posted 13 May 2024, 7:52 pm EST

    Spread.net v17 has added Ribbon Control, but how to set custom icon for the newly added RibbonButton has become a challenge. Can anyone help me?

  • Posted 14 May 2024, 7:45 pm EST

    Hi,

    You have to modify the RibbonButton’s IconSet collection to set icon for the ribbon button. Here is the code snippet to set Image for the ribbon button’s icon:

    (myNewBtn as RibbonButton).IconSet.Add(
        GrapeCity.Spreadsheet.WinForms.Ribbon.Icon.FromImage(
            new Size(40, 40),
            Color.Red,
            Image.FromFile("background_32.png")
        )
    );

    Kindly refer to the attached sample for full implementation. See RibbonIcon.zip

    Hope this helps you!

    Thanks & Regards,

    Aastha

  • Posted 14 May 2024, 7:55 pm EST

    [quote=aastha.gupta]

    Hi,

    You have to modify the RibbonButton’s IconSet collection to set icon for the ribbon button. Here is the code snippet to set Image for the ribbon button’s icon:

    (myNewBtn as RibbonButton).IconSet.Add(
        GrapeCity.Spreadsheet.WinForms.Ribbon.Icon.FromImage(
            new Size(40, 40),
            Color.Red,
            Image.FromFile("background_32.png")
        )
    );
    

    Kindly refer to the attached sample for full implementation. See RibbonIcon.zip

    Hope this helps you!

    Thanks & Regards,

    Aastha

    [/quote]Thanks so much!!!

Need extra support?

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

Learn More

Forum Channels