Can't open table borders dialog from ribbon bar

2 posts, 1 answers
  1. Mihajlo
    Mihajlo avatar
    47 posts
    Member since:
    Aug 2018

    Posted 06 Feb 2019 Link to this post

    A table has two dialogs that can modify the way the table looks, Table properties and Table borders. Both can be open from context menu, but only table properties can be open from ribbon bar as well. Is this a bug or a feature?
  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    2902 posts

    Posted 07 Feb 2019 Link to this post

    Hello Mihajlo,

    By design, the border dialog can be shown only from the context menu. We will consider adding such feature if we receive more request for it. 

    For now, you can manually add a button. It would be easier to inherit the RichTextEditorRibbonBar class because this gives direct access to all elements of the ribbon: 
    class MyRibbonUI : RichTextEditorRibbonBar
    {
        public MyRibbonUI()
        {
            var button = new RadButtonElement();
            button.Text = "Border";
            button.Image = this.buttonProperties.Image;
            button.TextImageRelation = TextImageRelation.ImageAboveText;
            button.ImageAlignment = ContentAlignment.TopCenter;
            button.TextAlignment = ContentAlignment.TopCenter;
            button.Padding = new System.Windows.Forms.Padding(0, 3, 0, 0);
            button.Click += Button_Click;
            this.groupTable.Items.Add( button);
        }
     
        private void Button_Click(object sender, EventArgs e)
        {
            this.AssociatedRichTextEditor.ShowTableBordersDialog();
        }
    }

    I hope this helps. Should you have any other questions do not hesitate to ask.
     
    Regards,
    Dimitar
    Progress Telerik
    Get quickly onboard and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top