This question is locked. New answers and comments are not allowed.
In the toolstrip item configuration menu item, would it be possible to remove the "No Text Associated" entry for separator items? They shouldn't really be visible in this context.
Thanks
Best regards
Marek
Thanks
Best regards
Marek
3 Answers, 1 is accepted
0
Hello Marek,
The solution is:
Best wishes,
Ray
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
The solution is:
- To subscribe to the DropDownOpened event by doing the following:
toolStripItem1.OverflowManager.DropDownButton.DropDownOpened +=new EventHandler(DropDownButton_DropDownOpened);
- Get access to the menu items in the add/remove menu item by using something similar in the DropDownOpened event handler:
for (int i = 0; i < (this.toolStripItem1.OverflowManager.DropDownButton.Items[itemsCount - 1] as RadMenuItem).Items.Count; i++)
{
RadMenuItem item = (this.toolStripItem1.OverflowManager.DropDownButton.Items[itemsCount - 1] as RadMenuItem).Items[i] as RadMenuItem;
if (item != null)
{
// Here you have access to a regular menu Item
item.Visibility = ElementVisibility.Collapsed;
continue;
}
RadMenuSeparatorItem separatorItem = (this.toolStripItem1.OverflowManager.DropDownButton.Items[itemsCount - 1] as RadMenuItem).Items[i] as RadMenuSeparatorItem;
if (separatorItem != null)
{
// Here you have access to the separator menu Item
separatorItem.Visibility = ElementVisibility.Collapsed;
continue;
}
}
Best wishes,
Ray
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

Marek
Top achievements
Rank 1
answered on 12 Jun 2007, 07:38 AM
Hi Ray
Thank you for the workaround, but I would really not expect to have to do this as I can't really see the need to have the separator items available in the Add/Remove buttons child menu - VS certainly doesn't do this. I don't know whether others agree, but the separators should be filtered out in the base code. Maybe it could be an additional property for the toostrip/menu strip classes whether to show the separator items or not?
Best regards
Marek
Thank you for the workaround, but I would really not expect to have to do this as I can't really see the need to have the separator items available in the Add/Remove buttons child menu - VS certainly doesn't do this. I don't know whether others agree, but the separators should be filtered out in the base code. Maybe it could be an additional property for the toostrip/menu strip classes whether to show the separator items or not?
Best regards
Marek
0
Hello Marek,
At present we do not have an additional property whether to show or not the separators. Nevertheless, your feedback is very constructive and I think that such a property will be helpful not only for separators. We could apply the same logic to items in the toolStripItem that we want to always be visible, and which could not be removed by the overflow menu. What do you think about that idea? I think that we will manage to add this functionality in one of the next versions.
I'm looking forward to your reply.
Kind regards,
Ray
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
At present we do not have an additional property whether to show or not the separators. Nevertheless, your feedback is very constructive and I think that such a property will be helpful not only for separators. We could apply the same logic to items in the toolStripItem that we want to always be visible, and which could not be removed by the overflow menu. What do you think about that idea? I think that we will manage to add this functionality in one of the next versions.
I'm looking forward to your reply.
Kind regards,
Ray
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center