I have a listbox that has a context menu that goes with it. The context menu has 3 options on it following the basic "Create new...", "Edit selected..." and "Remove selected..." style.
The rule is that at least one item must be in the listbox at all times, the user can always create new items or edit existing ones, but if there is only one item in the listbox and the context menu opens, should I leave the "Remove selected..." item enabled and just show a messagebox when the user clicks it saying "You can't do this, you have to have at least one item in the list..." or, should I disable the "Remove selected..." item.
The UX Guidebook says to remove (as in hide or completely remove) any interface items, including menu items and tabs in tab views, where the item or items in the tab do not apply in the current context. HOWEVER, if the user expects the item to apply, you should leave the item, disable it, and explain why it is disabled. The example image they show is of a tab view with all the controls disabled and a info box at the bottom saying it doesn't apply.
Since I can't really add a little explanation to the menu item, should I go with a messagebox or should I disable the item? I don't like the idea of removing it in this case.
I'm sure it depends on the scenario, but any general suggestions would be wonderful!