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 property TX Text Control .NET for Windows Forms
Windows.Forms.Ribbon Namespace
RibbonGroup Class
RibbonItems Property
Gets a collection of all items contained in this group.
), the TXTextControl.Windows.Forms.Ribbon.RibbonFormattingTab.FindItem method TX Text Control .NET for Windows Forms
Windows.Forms.Ribbon Namespace
RibbonFormattingTab Class
FindItem Method
Finds a control that has the provided RibbonFormattingTab.RibbonItem identifier.
can be used to retrieve the RibbonItem. Using the TXTextControl.Windows.Forms.Ribbon.RibbonButton.Text property TX Text Control .NET for Windows Forms
Windows.Forms.Ribbon Namespace
RibbonButton Class
Text Property
Overridden.
, 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 class TX Text Control .NET for Windows Forms
Windows.Forms.Ribbon Namespace
RibbonGroup Class
The RibbonGroup class represents a logical group of controls as they appear on a RibbonTab and is the base class of the HorizontalRibbonGroup class.
:

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!