How to replace DropDown (New tab, Close tab, Close other ...) with the system context menu ( new ContextMenu();).
I got to delete the menu like this:
And to make a new menu, I tried to do it using MouseDown:
I got to delete the menu like this:
RadTabbedFormControl.ContextMenuOpening += (obj, arg) => {
arg.ContextMenu.Items.Clear();
};
And to make a new menu, I tried to do it using MouseDown:
e.Tab.Item.MouseDown += (obj, args) => {
if
(args.Button == MouseButtons.Right)
{
ContextMenu testMenu=
new
ContextMenu();
testMenu.MenuItems.Add(
"Test"
);
testMenu.Show(e.Tab,
new
Point(args.Location.X + 5, args.Location.Y - 35));
}
};
But there was a problem with the error (Unable to display ContextMenu in invisible control) when clicking on an inactive tab.
Can you tell me another way?