TX Text Control .NET for Windows Forms is shipped with a fully-featured, customizable and programmable Ribbon Bar with pre-configured Ribbon Tabs for the most typical applications of TX Text Control.

TX Text Control Ribbon

Changing the ribbon item's text

In order to change the text of a RibbonItem (TXTextControl.Windows.Forms.Ribbon.RibbonGroup.RibbonItems), the TXTextControl.Windows.Forms.Ribbon.RibbonFormattingTab.FindItem method can be used to retrieve the RibbonItem. Using the TXTextControl.Windows.Forms.Ribbon.RibbonButton.Text , the text of the button can be changed:

Loading...

Adding events to ribbon items

It is possible to attach additional events to existing ribbon buttons. The following code adds a click event to the Paste button:

Loading...

Removing ribbon items

The following code removes a ribbon button from the parent container, a TXTextControl.Windows.Forms.Ribbon.RibbonGroup:

Loading...

Removing ribbon groups

The next code snipped removes a complete ribbon groug; in this case, the Font ribbon group:

Loading...

Removing ribbon tabs

Complete ribbon tabs can be removed using the Controls property of the Windows.Forms.Ribbon.Ribbon control:

Loading...

Creating new ribbon tabs

The following code creates a complete new Windows.Forms.Ribbon.RibbonTab with a new Windows.Forms.Ribbon.RibbonGroup. Additionally, a new Windows.Forms.Ribbon.RibbonButton is created and added to the created ribbon group. Finally, the ribbon tab is added to the Controls collection of the ribbon control and the selected tab is specified using the SelectedIndex property:

Loading...

Happy coding!