Message 1 of 7
Context Menu - Tooltip does not Work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have created a new CommandMenuItem and applied it successfully to the Context Menu, but the SetToolTip() method doesn't appear to be working, or the main UI isn't displaying the Tooltip at the very least. Is there something I am missing? All the built in Menu's have the instructions in the bottoms left.
Register Menu:
private void RegisterContextMenu(UIControlledApplication application)
{
application.RegisterContextMenu("RDG", new CreateContextMenu());
}
Interface:
internal class CreateContextMenu : IContextMenuCreator
{
public void BuildContextMenu(ContextMenu menu)
{
menu.AddSeparator();
CommandMenuItem item = new CommandMenuItem("Place on Sheet", typeof(ViewActiveToSheet).FullName, Assembly.GetAssembly(typeof(ViewActiveToSheet))!.Location);
item.SetAvailabilityClassName("Revit.Tools.Context.ViewMenuAvailability");
item.SetToolTip("Does this turn off?");
menu.AddItem(item);
}
}