2.3 Menu SubMenu
2.3 Menu SubMenu
.NET TECHNOLOGY
2.3 Use Menus and Submenus.
2.3 USE MENUS AND SUBMENUS.
Hot key
Menu Title
Menu bar
Separator
bar
Shortcut key :
key modifier (Ctrl, Alt, Shift +
letter/number
Enabled menu
title
Disabled menu
title
ToolStripMenuItem
1
2
CREATING MENU TITLES –
POPUP MENUS (CONTEXT MENU)
1 3
4
form's
ContextMenuStrip
property to
ContextMenuStrip1.
2
CREATING MENU TITLES –
POPUP MENUS (CONTEXT MENU)
Build the context menu as shown.
Set the form's ContextMenuStrip property to
ContextMenuStrip1.
Run the project – confirm that the context
menu displays whenever we right-click
different parts of the form.
CREATING MENU TITLES –
POPUP MENUS (CONTEXT MENU)
A form can have multiple context menus so that we
can tailor the menu for different controls – each
context menu requires its own ContextMenuStrip
control.
The context menu for a form or control on a form is
set by storing the name of the context menu to the
ContextMenuStrip property for the control or form.
If we have a single context menu – assign it to the
form – this will cause most controls to have this as
the assigned context menu.
Some controls, such as textbox controls, have built-
in context menus – they have the copy, cut, and
paste text context menu.
FURTHER READINGS
CIDOS :
1. LAB02-Activity Menu Submenus
2. Note and Activity-Menus
3. Any book related..