Help Button Event in RadRibbonBarForm

5 posts, 1 answers
  1. Kun
    Kun avatar
    42 posts
    Member since:
    Aug 2018

    Posted 25 Jan Link to this post

    Hello,

    My form is RadRibbonBarForm. Me.HelpButtonClicked cannot be fired when I click the help button in RadRibbonBar.

    I found out RadRibbonBar.HelpButton.Click can handle the help button click event.

    Does Me.HelpButtonClicked event not work any more in RadRibbonBarForm ?

    One more question, why VS doesn't accept the definition of the event:

    Private Sub RibbonBtn_Help_Click(sender As Object, e As EventArgs) Handles RadRibbonBar1.HelpButton.Click
    '---Bla bla
    End Sub

     

    But it accepts only wire the event like this :

    Private Sub FrmMain_Load(sender As Object, e As EventArgs)
        AddHandler RadRibbonBar1.HelpButton.Click, AddressOf RibbonBtn_Help_Click
    End Sub
     
    Private Sub RibbonBtn_Help_Click(sender As Object, e As EventArgs)
    '----Bla bla
    End Sub

     

    What's the different ?

    Thank you by advance.

     

     

     

     

  2. Dimitar
    Admin
    Dimitar avatar
    2823 posts

    Posted 25 Jan Link to this post

    Hi Kun,

    This works fine on my side with the latest version. For convenience, I prepared a small sample, based on the information that you provided so far and attached it to this thread. Could you please check it and let me know how it differs from your real setup? 

    In the event hanlder definition, you need to use CancelEventArgs. Setting the Cancel property to true will remove the question mark from the mouse cursor. 

    I am looking forward to your reply.

    Regards,
    Dimitar
    Progress Telerik
    Get quickly onboard and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Kun
    Kun avatar
    42 posts
    Member since:
    Aug 2018

    Posted 28 Jan in reply to Dimitar Link to this post

    Hello Dimitar,

    Unfortunately, I haven't resolved my problem by your demo. I wrote a small demo. 

    In my demo, a message box will be displayed when the help button is clicked.

    I used two different handlers to fire the event. But only one worked. Please check it out.

    Can you tell me why this.HelpButtonClicked can not be fired ?

    I can't upload the .rar file. You can download by this dropbox link:

    https://www.dropbox.com/s/2uwo3unfsxbjb4o/TelerikHelpButton.rar?dl=0

    using System;
    using System.ComponentModel;
     
    namespace TelerikHelpButton
    {
        public partial class RadRibbonForm1 : Telerik.WinControls.UI.RadRibbonForm
        {
            public RadRibbonForm1()
            {
                InitializeComponent();
                 
            }
     
            private void HelpButton_click(object sender, CancelEventArgs e)
            {
                Telerik.WinControls.RadMessageBox.Show("Help Button Clicked");
     
            }
     
            private void RadHelpButton_click(object sender, EventArgs e)
            {
                Telerik.WinControls.RadMessageBox.Show("Rad Help Button Clicked");
            }
     
            private void RadRibbonForm1_Load(object sender, EventArgs e)
            {
                this.HelpButtonClicked += new CancelEventHandler(this.HelpButton_click);
                this.radRibbonBar1.HelpButton.Click += new EventHandler(this.RadHelpButton_click);
            }
        }
    }

    Thank you by advance.

  4. Answer
    Dimitar
    Admin
    Dimitar avatar
    2823 posts

    Posted 28 Jan Link to this post

    Hello Kun,

    There are 2 help buttons in the ribbon (see attached) and the HelpButtonClicked event will fire if you click the help button in the title bar. Here is how you can show the help button manually:
    this.HelpButton = true;
    this.AllowAero = false;
    this.radRibbonBar1.RibbonBarElement.RibbonCaption.HelpButton.Visibility = Telerik.WinControls.ElementVisibility.Visible;

    Should you have any other questions do not hesitate to ask.

    Regards,
    Dimitar
    Progress Telerik
    Get quickly onboard and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  5. Kun
    Kun avatar
    42 posts
    Member since:
    Aug 2018

    Posted 28 Jan in reply to Dimitar Link to this post

    Thank you for your help, Dimitar.
Back to Top