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

2009 Q3 Exit and Options Buttons in the RadRibbonBar

4 Answers 156 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Denny
Top achievements
Rank 1
Denny asked on 05 Nov 2009, 11:06 AM
Hello,

how can I handle the click events of the Exit and Option Button in the RadRibbonBar?

THX.

4 Answers, 1 is accepted

Sort by
0
Accepted
Deyan
Telerik team
answered on 05 Nov 2009, 12:51 PM
Hello Denny Riedl,

Thanks for your question. Take a look at the following code snippet:

public Form1()
        {
            InitializeComponent();
            this.radRibbonBar1.OptionsButton.Click += new EventHandler(OptionsButton_Click);
            this.radRibbonBar1.ExitButton.Click += new EventHandler(ExitButton_Click);
        }
  
        void ExitButton_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Exit button clicked");
        }
  
        void OptionsButton_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Options button clicked");
        }

You can access the Options and Exit buttons by using the corresponding properties of RadRibbonBarElement class.

Another way to subscribe for the events of these buttons is to select RadRibbonBar control in Visual Studio designer, open the Properties window, and use the Events section where the OptionsButton and the ExitButton are enlisted.

I hope this is helpful. Do not hesitate to write back if you need further assistance.

Kind regards,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Denny
Top achievements
Rank 1
answered on 05 Nov 2009, 01:05 PM
Hello Deylan,

thanks for the hint.

I use it in VB:

        AddHandler Me.RadRibbonBar1.ExitButton.Click, AddressOf Me.ExitButton_Click  
        AddHandler Me.RadRibbonBar1.OptionsButton.Click, AddressOf Me.OptionsButton_Click
0
John
Top achievements
Rank 1
answered on 30 May 2013, 12:55 PM
I don't see those events in the Properties Window with version 2013.1.321.40 using Visual Studio 2012. The design time event handlers seem to have disappeared. However setting the event handlers at run time does still work.
0
Stefan
Telerik team
answered on 04 Jun 2013, 12:29 PM
Hi John,

These events are not exposed on the control, they are events of a property of the control and this is why you do not see them at design time and you should use code to subscribe for them.

I hope this helps.

Regards,
Stefan
Telerik
RadChart for WinForms is obsolete. Now what?
Tags
RibbonBar
Asked by
Denny
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Denny
Top achievements
Rank 1
John
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or