Hi
Is there a way to remove the startButtonImage, respectively the tabs start at the left?
If I set:
this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
The button is gone but the space is still here.
I also tried:
this.radRibbonBar1.StartButtonImage = null;
this.radRibbonBar1.StartMenuWidth = 0;
but the space is always here.
Thank you in Advance
Kind Regards,
Dominik
4 Answers, 1 is accepted
Hello Dominik,
In order to avoid the empty space reserved for the ApplicationButtonElement you should access the StripViewItemContainer and set its Margin property as shown in the following code snippet:
StripViewItemContainer tabsContainer = this.radRibbonBar1.RibbonBarElement.TabStripElement.ItemContainer;
tabsContainer.Margin = new Padding(0, 0, 70, 0);
I hope this helps. Should you have any other questions, I will be glad to help.
Regards,
Nadya
Progress Telerik
Hello Nadya
Thank you very much for the quick and detailed answer. It worked.
Regards
Dominik
I was able to get the tab to go away using the above tips, but the space is still there as shown. How do I remove the empty space to the left of the first tab? Here is my code in the form constructor after InitializeComponent():
Me.RadRibbonBar1.RibbonBarElement.ApplicationButtonElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed
Me.RadRibbonBar1.RibbonBarElement.StartMenuWidth = 0
Me.RadRibbonBar1.RibbonBarElement.TabStripElement.ItemContainer.Margin = New Padding(0, 0, 70, 0)
Me.PerformLayout()
Hello Scott,
The provided solution in my previous post is related to the TelerikMertoBlueGrey theme. However, the Margin property is the right way to manipulate the RibbonTab position. If you use another theme you should adjust the Margin property differently. Here is an example if you use the ContorlDefault theme:
Me.radRibbonBar1.RibbonBarElement.TabStripElement.ItemContainer.Margin = New Padding(-45, 0, 0, 0)
If you are experiencing any further difficulties it would be greatly appreciated if you can specify which theme you use in your application.
I hope this information helps. Let me know if you need further assistance.
Regards,
Nadya
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.