Clear items from RichTextEditorRibbonBar start menu.

2 posts, 1 answers
  1. Oproma
    Oproma avatar
    11 posts
    Member since:
    Oct 2012

    Posted 07 Jul 2015 Link to this post

    Hi there,

    I was wondering if it was possible to modify the start menu of the RichTextEditorRibbonBar. Ideally I would like to clear all the items and add my own. However, from my experiments, this is not possible.

     

    Is there a way to achieve this without manually creating a RibbonBar and re-create all the text formating operations?

     

    Thank you

  2. Answer
    Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 08 Jul 2015 Link to this post

    Hello,

    Thank you for contacting Telerik support.

    RichTextEditorRibbonBar uses BackstageView for item start button. More information on this functionality is available here: http://www.telerik.com/help/winforms/ribbonbar-backstage-view-working-with-backstage-view.html.

    Here is also an example how to clear the existing items and add a tab item with a control in it and a button item with some functionality:
    richTextEditorRibbonBar1.BackstageControl.Items.Clear();
     
    BackstageTabItem tab1 = new BackstageTabItem("tab text");
    tab1.Page.Controls.Add(new RadLabel() { Text = "some control" });
    richTextEditorRibbonBar1.BackstageControl.Items.Add(tab1);
     
    BackstageButtonItem btn1 = new BackstageButtonItem("btn text");
    btn1.Click += (s,ev) => { RadMessageBox.Show("hello"); };
    richTextEditorRibbonBar1.BackstageControl.Items.Add(btn1);

    Note that changes to the RichTextEditorRibbonBar is recommended to be done with code, not at design time.

    I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.

    Regards,
    Stefan
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top