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

OverFlowButtonElement "Add or Remove" Button

3 Answers 80 Views
Toolstrip (obsolete as of Q3 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dominique
Top achievements
Rank 1
Dominique asked on 11 Dec 2007, 11:23 AM
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

3 Answers, 1 is accepted

Sort by
0
Boyko Markov
Telerik team
answered on 12 Dec 2007, 03:21 PM
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
0
Dominique
Top achievements
Rank 1
answered on 13 Dec 2007, 09:18 AM
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

0
Boyko Markov
Telerik team
answered on 14 Dec 2007, 09:19 AM
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
Tags
Toolstrip (obsolete as of Q3 2010)
Asked by
Dominique
Top achievements
Rank 1
Answers by
Boyko Markov
Telerik team
Dominique
Top achievements
Rank 1
Share this question
or