About the ribbon of spread.net v17

Posted by: 8166582 on 14 May 2024, 4:52 am EST

    • Post Options:
    • Link

    Posted 14 May 2024, 4:52 am 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 15 May 2024, 4:45 am 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 15 May 2024, 4:55 am 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