OverFlowButtonElement "Add or Remove" Button

4 posts, 0 answers
  1. Dominique
    Dominique avatar
    5 posts
    Member since:
    Nov 2007

    Posted 11 Dec 2007 Link to this post

    Hi,

    I want to know, if it's possible to remove the "Add or Remove" button in the OverFlowButtonElement of a RadToolStrip ?

    And also if its possible to change the label of this button (multilingual application)

    Thanks

    @+ Dom
  2. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 12 Dec 2007 Link to this post

    Hello Dominique,

    Thank you for the question. It is very important for us to learn how our customers are customizing our controls in their projects.

    Please use the code blocks below:

    1. Subscribe to the DropDownOpened event

    this.radToolStripItem1.OverflowManager.DropDownButton.DropDownOpened += new EventHandler(DropDownButton_DropDownOpened);

    2. Hide the Add or Remove button

    void
    DropDownButton_DropDownOpened(object sender, EventArgs e)
    {
       this.radToolStripItem1.OverflowManager.DropDownButton.Items[0].Visibility =    Telerik.WinControls.ElementVisibility.Hidden;
    }

    3. If you would like to change the label you can use the Text property of the item.

    Thank you again for writing. If you have additional questions, do not hesitate to contact us.

    Sincerely yours,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Dominique
    Dominique avatar
    5 posts
    Member since:
    Nov 2007

    Posted 13 Dec 2007 Link to this post

    Hi,

    Your code isn't perfect, I want to remove it, not hide it. But the trail was really good !

    The code for remove :

    private

    void DropDownButton_DropDownOpened(object sender, EventArgs e)

    {

    int index = this.radToolStripItem1.OverflowManager.DropDownButton.Items.Count - 1;

    this.radToolStripItem1.OverflowManager.DropDownButton.Items.Remove(this.radToolStripItem1.OverflowManager.DropDownButton.Items[index]);

    }


    And for a better visual effect use the Opening event not the Opened ;-)


    Thanks a lot

  5. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 14 Dec 2007 Link to this post

    Hello Dominique,

    Thank you for the feedback. I'll be happy to help you if you have additional questions.

    All the best,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top