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

How to add a WinForms control to a RadRibbonBar Tab

2 Answers 129 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Dominik
Top achievements
Rank 1
Dominik asked on 05 Feb 2020, 02:50 PM

Hi,

 

I read your article "Adding a WinForms control to a Ribbon Bar" https://www.telerik.com/support/kb/winforms/details/adding-a-winforms-control-to-a-ribbon-bar

Is there also a simple way to add such a control in place of a RibbonTab.

 

Thank you in Advance

Kind Regards,
Dominik

2 Answers, 1 is accepted

Sort by
0
Accepted
Nadya | Tech Support Engineer
Telerik team
answered on 10 Feb 2020, 08:15 AM

Hello Dominik,

Yes, you can add control in the Children collection of RibbonTab by using a similar approach. The RadHostItem class allows you to add controls to elements. You can find more information on this topic here: https://docs.telerik.com/devtools/winforms/telerik-presentation-framework/elements/use-control-inside-an-element.

DateTimePicker datePicker = new DateTimePicker();
RadHostItem datePickerHost = new RadHostItem(datePicker);
this.ribbonTab1.Children.Add(datePickerHost);

I hope this helps. Should you have any other questions do not hesitate to ask.

Regards,
Nadya
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Dominik
Top achievements
Rank 1
answered on 12 Mar 2020, 04:42 PM
Hi Nadya,
Thank you very much, it worked great.
Kind Regards,
Dominik
Tags
RibbonBar
Asked by
Dominik
Top achievements
Rank 1
Answers by
Nadya | Tech Support Engineer
Telerik team
Dominik
Top achievements
Rank 1
Share this question
or