Icon in C1FlexViewer

Posted by: abel.perez on 28 June 2019, 1:57 pm EST

    • Post Options:
    • Link

    Posted 28 June 2019, 1:57 pm EST

    I am using a C1FlexViewer in my project. I see that if you use a C1RibbonForm you can place an icon on the FlexViewer and also a caption. Can we do this only with a C1FlexViewer.

    See the examples C:\Users{userid}\Documents\ComponentOne Samples\WinForms\C1Document\VB\SsrsViewer for an example.

  • Posted 1 July 2019, 2:45 am EST

    Hello,

    Yes, you can directly add RibbonItems to the Ribbon of C1FlexViewer. Refer the below mentioned blog’s “Add custom button(s):” section for the details:

    https://www.grapecity.com/blogs/flexviewer-winforms-customization

    Also refer the attached application for the implementation. It has a button and some Text added to the ribbon QuickAccessToolbar (QAT) as well.

    Let me know if you need further assistance.

    Regards,

    Esha

    prj_FlexReport_VB.zip

  • Posted 1 July 2019, 9:33 am EST - Updated 4 October 2022, 1:05 am EST

    Thanks for the answer. Although it’s similar here is what I was hoping to recreate:

  • Posted 1 July 2019, 1:47 pm EST - Updated 4 October 2022, 1:05 am EST

    This will probably work for me:

            'tweak the Quick Access Toolbar
            Dim rbLogo As RibbonButton = New RibbonButton(My.Resources.Logo)
            rbLogo.ToolTip = "MyAirlines"
            AddHandler rbLogo.Click, AddressOf Open1_Click
            c1FlxViewerMain.Ribbon.Qat.Items.Insert(0, rbLogo)
            Dim rbCaption As RibbonButton = New RibbonButton("Operations Engineering")
            Dim cnt As Integer = c1FlxViewerMain.Ribbon.Qat.Items.Count
            AddHandler rbCaption.Click, AddressOf Open2_Click
            c1FlxViewerMain.Ribbon.Qat.Items.Insert(cnt + 0, rbCaption)
    

  • Posted 2 July 2019, 6:24 am EST

    Hello,

    Thanks for sharing the code snippet that you use.

    This is the best possible way to achieve the requirement in the absence of a RibbonForm i.e. by adding items to QAT at the desired location. However, for rbCaption, you can simply use:

    c1FlxViewerMain.Ribbon.Qat.Items.Add(rbCaption)
    
    

    Thanks.

  • Posted 2 July 2019, 2:33 pm EST

    Done. Thanks for all the help.

Need extra support?

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

Learn More

Forum Channels