|
Categories: Menus
|
Tags: Architects, Developers, Navigation, 1. Beginner, 2. Intermediate, 3. Advanced, Navigation, Pre v6.3, v6.3, v6.4 and Later
Revision:
1
Posted:
11/July/2009
Updated:
04/Dec/2010
Status:
Publish
Types: Reference
|
This article will have a few sections added to it soon, based on the following article type skeleton: Control OverviewThe ContextMenu control is functionally equivialent to the Windows Forms ContextMenu control and serves the purpose to provide you with shortcut menus or context sensitve menus that you can attach to your controls and access via right mouse click on the control. ContextMenu fairly resembles the MainMenu control, which is for use as the menu structure on your mainform.
There is a vital difference between how events are used between on ContextMenu versus MainMenu. On MainMenu, the events on the MainMenu control itself fire, but on the ContextMenu, no event on the ContextMenu control itself fires. Instead, the control you attach the ContextMenu to has a MenuClick event, that is used for event handling of ContextMenu related events. This means that you don't attach any event handlers to the ContextMenu control itself.
Each ContextMenu has a MenuItems collection, which is a collection of zero or more MenuItem controls, representing the items on the menu. Each MenuItem has it's own MenuItems collection, thus supporting a multilvel menu structure.
AvailabilityThe ContextMenu is one of the Out of the Box standard controls, which means it is free and available in all Visual WebGui versions.
Relevant membersProperties
Name
| Description
|
|---|
MenuItems
| Collection of MenuItem controls representing the items on the ContextMenu
| MenuItem.MenuItems
| Collection of MenuItem controls for the MenuItem, representing further sublevels of the menu structure
| MenuItem.Text
| The text that will show on the menu for this MenuItem
| MenuItem.Tag
| Tag is a user definable storage, for storing whatever we like to store. It can contain any object type. Most often it is used to store a string or numerical value, for the procedure handling the MenuClick event to know what MenuItem was selected. It can however be used to store any value, which could even be used as an address to a function to handle the processing when that item is selected on the menu.
|
MethodsName
| Description
|
|---|
Update
| Used to refresh the control after some programmatic changes have been made.
|
Events| Name | Description |
|---|
MenuClick
| This event is not used in Visual WebGui
| | PopUp | |
Samples of useTips and TricksNo event fires on ContextMenu - use MenuClick event on controlAs mentioned in the overview, there is no menu related event that fires in VisualWebGui on the ContextMenu control. Instead, you use the MenuClick event of the various controls you attach your ContextMenu to. Same ContextMenu - multiple ControlsThe same ContextMenu instance can be used for multiple Controls and no changes are needed on the ContextMenu to support that. SDK Version highlightsSee also RererencesOther references
About the author
Related Articles
|
Menus
|
|
|
This video demonstrates how to create and use a context menu in Visual WebGui.
Tags:
Developers, 1. Beginner, Pre v6.3, v6.3, v6.4 and Later, 2. Intermediate, 3. Advanced
|
|
|
Tags:
Developers, Navigation, 1. Beginner, 2. Intermediate, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
Tags:
Developers, Navigation, 1. Beginner, 2. Intermediate, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
Tags:
Developers, Navigation, 1. Beginner, 2. Intermediate, Navigation, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
Tags:
Architects, Developers, Navigation, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
|
|
|
Tags:
Developers, 1. Beginner, 2. Intermediate, Customization, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
|