Adding ButtonElement to the StripButtons

4 posts, 0 answers
  1. Darko
    Darko avatar
    14 posts
    Member since:
    Sep 2008

    Posted 17 Sep 2014 Link to this post

    Hi,

    I have already managed to add a Help Button to my BaseForm (see attached image).
    I would love to have the same little help icon with the Click handler added just before the Scroll Buttons on the RadPageView Strip Element.
    Here is the code for the Help Button:

    RadButtonElement _btnHelp = new RadButtonElement();
    _btnHelp.ShowBorder = false;
    _btnHelp.Image = global::labs.STAR.App.Properties.Resources.helpicon;
    _btnHelp.ClickMode = ClickMode.Press;
    _btnHelp.Click += _btnHelp_Click;
    this.FormElement.TitleBar.SystemButtons.Children.Insert(0, _btnHelp);



    thx in advance,
    Darko
  2. Darko
    Darko avatar
    14 posts
    Member since:
    Sep 2008

    Posted 17 Sep 2014 Link to this post

    image was not attached....
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 19 Sep 2014 Link to this post

    Hello Darko,

    Thank you for writing.

    You can add a help button next to the strip buttons in the RadPageView by using the following code snippet:
    public Form1()
    {
        InitializeComponent();
     
        RadPageViewStripElement stripElement = this.radPageView1.ViewElement as RadPageViewStripElement;
     
        RadPageViewStripButtonElement infoButton = new RadPageViewStripButtonElement();
        infoButton.Image = Properties.Resources.info;
        stripElement.ItemContainer.ButtonsPanel.Children.Insert(0, infoButton);
        infoButton.Click += infoButton_Click;
    }
     
    private void infoButton_Click(object sender, EventArgs e)
    {
        RadMessageBox.Show("Clicked");
    }

    I hope this information helps. Should you have further questions, I would be glad to help.
     
    Regards,
    Desislava
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  5. Darko
    Darko avatar
    14 posts
    Member since:
    Sep 2008

    Posted 22 Sep 2014 in reply to Dess Link to this post

    thx a lot, that did the trick 
Back to Top