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

RibbonBar StartMenu problem

12 Answers 363 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
GUIjunkie
Top achievements
Rank 1
GUIjunkie asked on 04 Jun 2007, 04:05 PM
I've added a StartMenu with menu items to a RibbonBar.

The problem is that I see an Options and Exit button in my menu and would like to NOT have them there.  I can't find where to remove these two button items.

Thanks...

12 Answers, 1 is accepted

Sort by
0
GUIjunkie
Top achievements
Rank 1
answered on 04 Jun 2007, 05:32 PM
ok, i've removed the Options and Exit buttons from the main menu; however, i still show a right column with nothing in it and the property relating to the right column menu is set to false. 
0
Jack
Telerik team
answered on 05 Jun 2007, 08:08 AM
Hello John,

You can access the StartMenu in RadRibbonBar and hide the right column by using this code:

RadDropDownButtonElement button = (RadDropDownButtonElement)this.radRibbonBar1.RibbonBarElement.Children[2];
RadSubMenuLayoutPanel panel = (RadSubMenuLayoutPanel)button.DropDownMenu.PopupElement;
panel.IsTwoColumnMenu = false;


Let us know if this helps.
 

Greetings,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
GUIjunkie
Top achievements
Rank 1
answered on 05 Jun 2007, 04:32 PM
yes, this did work; however, why can't this be done during design as oppossed to runtime?

thanks...
0
Jack
Telerik team
answered on 06 Jun 2007, 01:19 PM
Good point, John, this is an issue and we will fix it in our next major release (Q2 2007). Thanks for the feedback.

Greetings,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Anders Bergström
Top achievements
Rank 1
answered on 15 Apr 2010, 01:35 PM
Hi,
Is the issue with hiding the right column now really included in design time? I'm using Q1 2010 SP1, and I can't find this feature anywhere in design time. I also have trouble compiling the code example for hiding the right column programatically since I can't find the assembly to reference that includes the RadSubMenuLayoutPanel? Am I missing something here...?

Could you also show how to solve GUIjunkies initial question on how to hide the Options and Exit buttons? I have the same problem.

Thanks.
0
Deyan
Telerik team
answered on 21 Apr 2010, 01:55 PM
Hi Anders,

Thanks for writing and for your questions.

You can hide the Options- and ExitButton by accessing them from the property grid of the RadRibbonBar while in the Visual Studio Designer. There are two properties which expose both buttons. You can expand their sub-properties and find the Visibility property and set it according to your preferences.

You can also hide these buttons programmatically the following way:
 

this.radRibbonBar1.OptionsButton.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
this.radRibbonBar1.ExitButton.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;

Hiding the right column in the Application Menu is possible only programmatically. The following code snippet demonstrates how to achieve this:

this.radRibbonBar1.RibbonBarElement.ApplicationMenuRightColumnWidth = 0;

I hope this is helpful.

Do not hesitate to write back anytime you have further questions or need assistance.

All the best,
Deyan
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Nabeel
Top achievements
Rank 1
answered on 25 Nov 2010, 01:22 PM
I tried all ways using

            this.radRibbonBar1.RibbonBarElement.ApplicationMenuRightColumnWidth=0;

but it shows error  this.radRibbonBar1.RibbonBarElement.ApplicationMenuRightColumnWidth as Read only. which is unassignable...
0
Nikolay
Telerik team
answered on 25 Nov 2010, 05:22 PM
Hello Nabeel,

In order to hide the right part of the RadRibbonBar main menu, you should set the ShowTwoColumnDropDownMenu property to false:
this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement.ShowTwoColumnDropDownMenu = false;


Kind regards,
Nikolay
the Telerik team
Get started with RadControls for WinForms with numerous videos and detailed documentation.
0
Nabeel
Top achievements
Rank 1
answered on 27 Nov 2010, 09:43 AM
this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement.ShowTwoColumnDropDownMenu = false;


I tried this code, mention above.
"this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement" is successfully detected by Visual Studio 2008 but the method "ShowTwoColumnDropDownMenu" doesn't appear and it shows Message on mouse over:

'Telerik.WinControls.UI.RadDropDownButtonElement' doesn't contain a defination for 'ShowTwoColumnDropDownMenu' and no extension method 'ShowTwoColumnDropDownMenu' accepting a first arguement of type 'Telerik.WinControls.UI.RadDropDownButtonElement' could be found (are you missing a using directive or an assembly reference?)
0
Nikolay
Telerik team
answered on 02 Dec 2010, 03:10 PM
Hello Nabeel,

Most probably, you are experiencing the issue, because you are using an old version of our controls where the property does not exist. Please update to our latest version Q3 2010 and try again.

Let me know if you still experience any issues with this.

Best wishes,
Nikolay
the Telerik team
Get started with RadControls for WinForms with numerous videos and detailed documentation.
0
Dadan
Top achievements
Rank 1
answered on 02 Apr 2013, 04:23 AM
Hi GUIjunkie,,

 can you tell me how to remove The Option and Exit button from the start menu ??
0
Stefan
Telerik team
answered on 04 Apr 2013, 02:48 PM
Hi Dadan,

There are properties of the control allowing you to access these buttons, and from there you can set their Visibility:
radRibbonBar1.OptionsButton.Visibility = ElementVisibility.Collapsed;
radRibbonBar1.ExitButton.Visibility = ElementVisibility.Collapsed;

I hope this helps.

Kind regards,
Stefan
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
Tags
RibbonBar
Asked by
GUIjunkie
Top achievements
Rank 1
Answers by
GUIjunkie
Top achievements
Rank 1
Jack
Telerik team
Anders Bergström
Top achievements
Rank 1
Deyan
Telerik team
Nabeel
Top achievements
Rank 1
Nikolay
Telerik team
Dadan
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or