Try OpenEdge Now
skip to main content
Introducing the Progress Developer Studio for OpenEdge Visual Designer
Creating the Sports Window : Modifying the functionality of menu and toolbar items : Removing the New menu item
 

Removing the New menu item

To remove the File > New menu item:
1. With sportsForm.cls open in the Visual Designer, select File > New from the Sports 2000 menu bar:
Notice that the Properties view updates to show the properties and event subscriptions for the selected menu item:
The Properties view shows that the New menu item (newToolStripMenuItem) subscribes to the Click event, and the ShowNewForm method runs when the menu item is clicked.
Note: At this point you could disable the New menu item simply by deleting ShowNewForm from the list, thereby unsubscribing from the Click event. However, that would leave an unresponsive menu item, which would look like a defect in a real application.
Another alternative is to modify the ShowNewForm() method to do something relevant to the sample application. If you double-click on ShowNewForm, the method will appear in the ABL Editor.
2. Right-click on the New menu item.
The drop-down menu gives you a number of options, including disabling or enabling, showing or hiding shortcut keys, and deleting as shown in the following illustration:
3. Choose Delete to get rid of the New menu item.