TX Text Control X14 (24.0) comes with a fully-customizable, programmable Ribbon control. Pre-configured RibbonTabs can be used to create typical TX Text Control applications without writing a single line of code.

This article shows how to customize the Ribbon control. A new RibbonTab is inserted that contains a custom RibbonGroup with a RibbonButton that executes a command when clicked.

  • Drag and drop a new instance of the Ribbon control from the toolbox to a new form in a Windows Forms project:

    Customizing the Text Control Ribbon control
  • Click on the blue File RibbonTab title to select the created control and find the SmartTag in the upper right corner. Click on the SmartTag to open the Ribbon Tasks list and choose Add a Quick Access Toolbar.

    Customizing the Text Control Ribbon control

This will change the form inheritance to RibbonForm which adds ribbon features to the form such as the Quick Access Toolbar and the centered form title.

Now, in the Form Load event, you can customize the ribbon by adding tabs and groups. The following code creates and inserts a new RibbonTab:

Loading...

In the following code, a new RibbonButton is created and a Click event is attached. The RibbonItem is then added to a newly created HorizontalRibbonGroup.

Loading...

Finally, the new RibbonGroup is added to the RibbonTab:

Loading...

The following screenshot shows the newly created RibbonTab and it's elements:

Customizing the Text Control Ribbon control

Try this on your own and download the trial version of TX Text Control .NET for Windows Forms X14.