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

Remove the space of the StartButtonImage

4 Answers 173 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Dominik
Top achievements
Rank 1
Dominik asked on 01 Nov 2019, 02:45 PM

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

Sort by
0
Accepted
Nadya | Tech Support Engineer
Telerik team
answered on 04 Nov 2019, 11:00 AM

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

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 04 Nov 2019, 11:07 AM

Hello Nadya

Thank you very much for the quick and detailed answer. It worked.

Regards

Dominik

0
SP
Top achievements
Rank 1
answered on 01 Jun 2020, 04:11 PM

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()

0
Nadya | Tech Support Engineer
Telerik team
answered on 02 Jun 2020, 01:56 PM

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

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
RibbonBar
Asked by
Dominik
Top achievements
Rank 1
Answers by
Nadya | Tech Support Engineer
Telerik team
Dominik
Top achievements
Rank 1
SP
Top achievements
Rank 1
Share this question
or