This is a migrated thread and some comments may be shown as answers.

Can't open table borders dialog from ribbon bar

1 Answer 11 Views
RichTextEditor
This is a migrated thread and some comments may be shown as answers.
Mihajlo
Top achievements
Rank 1
Mihajlo asked on 06 Feb 2019, 10:59 AM
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?

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 07 Feb 2019, 10:51 AM
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.
Tags
RichTextEditor
Asked by
Mihajlo
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or