2009 Q3 Exit and Options Buttons in the RadRibbonBar

5 posts, 1 answers
  1. Denny
    Denny avatar
    7 posts
    Member since:
    Feb 2005

    Posted 05 Nov 2009 Link to this post

    Hello,

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

    THX.
  2. Answer
    Deyan
    Admin
    Deyan avatar
    2038 posts

    Posted 05 Nov 2009 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Denny
    Denny avatar
    7 posts
    Member since:
    Feb 2005

    Posted 05 Nov 2009 Link to this post

    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
  5. John
    John avatar
    1 posts
    Member since:
    Apr 2013

    Posted 30 May 2013 Link to this post

    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.
  6. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 04 Jun 2013 Link to this post

    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?
Back to Top
UI for WinForms is Visual Studio 2017 Ready