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

How do I add elements to the header of a TabbedForm?

7 Answers 105 Views
TabbedForm
This is a migrated thread and some comments may be shown as answers.
Serg
Top achievements
Rank 1
Veteran
Serg asked on 24 Dec 2020, 02:35 AM

I see TabbedForm has RightItems and LeftItems. How to add various controls there?

I've tried creating a Button(Button btn = new Button();), and adding it(RightItems.add(btn)). However, this did not work, since the Add method asks for a certain RadItem ?! I did not find details and examples in the documentation :(

7 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 24 Dec 2020, 10:08 AM

Hello, Serg,   

Please have a look at the following help article to get familiar with the structure of RadTabbedForm: https://docs.telerik.com/devtools/winforms/controls/forms-and-dialogs/tabbedform/structure 

The Left/Right QuickAccessToolBar actually represents the Left/RightItems.

This is how you can add items at design time:

Please refer to the following help article which is quite useful about adding items to the both quick access toolbars either at design time or at run time.

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Serg
Top achievements
Rank 1
Veteran
answered on 24 Dec 2020, 01:28 PM
Thanks for the link, but there is nothing about adding elements. There is only drawing with the structure form. How do I add items to the "Left / Right QuickAccessToolBar" from code?
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 24 Dec 2020, 01:34 PM

Hello, Serg,

Please accept my sincere apologies for the missed second link in my previous reply. Here it is: https://docs.telerik.com/devtools/winforms/controls/forms-and-dialogs/tabbedform/features/quick-actions 

The "Add Items at Run-Time" section demonstrates how to add button elements to the left/right quick access toolbar: https://docs.telerik.com/devtools/winforms/controls/forms-and-dialogs/tabbedform/features/quick-actions#add-items-at-run-time 

Should you have further questions please let me know.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Serg
Top achievements
Rank 1
Veteran
answered on 24 Dec 2020, 01:46 PM
Thank you so much! This is what you need!

Can you please tell me if it is possible to add only a button, without a drop-down menu and its icon?
0
Nadya | Tech Support Engineer
Telerik team
answered on 24 Dec 2020, 03:04 PM

Hello, Serg,

According to the provided picture, it seems that you do not want the overflow button from the quick access toolbar. In order to hide it please refer to the following code snippet:

this.TabbedFormControl.LeftItems.Add(new RadButtonElement { Text = "button1" });
RadQuickAccessToolBar toolbar = this.radTabbedFormControl1.TabbedFormControlElement.Children[3] as RadQuickAccessToolBar;
toolbar.OverflowButtonElement.Visibility = ElementVisibility.Collapsed;

I hope this helps. If you have further questions please let me know.

Regards,
Nadya
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Serg
Top achievements
Rank 1
Veteran
answered on 24 Dec 2020, 07:46 PM

Thank you! it really helped me! How is it possible to change the color and style of this panel?

I tried to change color this way:
 

toolbar.OverflowButtonElement.BackColor = Color.Red;
toolbar.BackColor = Color.Red;
this.TabbedFormControl.RightItemsContainer.BackColor = Color.Red;

But not a single line works. The color is still blue. I want to change the color and completely remove all padding, so that only the button is visible, and there are no borders or indents.

0
Nadya | Tech Support Engineer
Telerik team
answered on 25 Dec 2020, 07:47 AM

Hello, Serg,

Following the provided information it seems that you would like to change the color of the panel that hosts the buttons. In this case, you should access the TabbedFormControlElement.CaptionFill:

 this.TabbedFormControl.TabbedFormControlElement.CaptionFill.BackColor = Color.Yellow;
 this.TabbedFormControl.TabbedFormControlElement.CaptionFill.GradientStyle = GradientStyles.Solid;

I hope this helps. Let me know if you have other questions.

Regards,
Nadya
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
TabbedForm
Asked by
Serg
Top achievements
Rank 1
Veteran
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Serg
Top achievements
Rank 1
Veteran
Nadya | Tech Support Engineer
Telerik team
Share this question
or