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

Working with tables...

2 Answers 58 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Anthony
Top achievements
Rank 1
Anthony asked on 13 Apr 2012, 02:34 AM
Hi, Telerik Team,

Working with RichTextbox I have found that you can change table borders by selecting a table, clicking right mouse button and selecting "Table Borders..." on a context menu.However, I am curious whether it is possible to put this menu item from the context menu onto a panel(Home,Insert and etc.)...let's say under the Table tab???If possible can you give an example please.

Best Regards,
Anton.

2 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 17 Apr 2012, 11:03 PM
Hello Anthony,

You need to edit the RadRichTextBoxRibbonUI and simply add 1 button at the desired place which in your case will be the RibbonTab with name Table. You need to add this RadRibbonButton:

<telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ShowTablePropertiesDialogCommand}" Size="Medium" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/TableProperties.png" Text="Table properties" />

The only thing that you should have in mind is that the command can only be executed when the caret is inside a table. In case the current position of the caret is not inside a table (or the table is not selected), it will not be clear which table the settings should be applied to. Therefore, in these cases, the CanExecute method of the command returns false and the button will be disabled.

 Don't hesitate to contact us if you have other questions.

Kind regards,
Martin
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Anthony
Top achievements
Rank 1
answered on 18 Apr 2012, 12:26 AM
Thank you very much!I actually was lost in finding an appropriate command.Sometimes very difficult to find commands unfortunally.
Tags
RichTextBox
Asked by
Anthony
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Anthony
Top achievements
Rank 1
Share this question
or