Class: cCJMDIWindowsMenuItem
Properties | Events | Methods | Index of Classes
A popup menu item class that dynamically adds MDI views to the end of its item list
Hierarchy
cObject > DfComAutomationObject > cComAutomationObject > cCJCommandBarAction > cCJAction > cCJMenuItem > cCJMDIWindowsMenuItem
Show full hierarchy and direct subclasses
- cObject
- DfComAutomationObject
- cComAutomationObject
- cCJCommandBarAction
- cCJAction
- cCJMenuItem
- cCJMDIWindowsMenuItem
Library: Windows Application Class Library
Package: cCJMDIWindowsMenuItem.pkg
Description
cCJMDIWindowsMenuItem is a popup menu item class, which adds MDI views to the end of its item list. Objects based on this class can be used like any other popup menu item. You can add any number of static cCJMenuItem objects to the popup. However, the end of the list will be dynamically populated with a list of active MDI views.
In the following example, all open MDI views will be displayed at the end of the list after the last static item.
Object oWindowMenu is a cCJMDIWindowsMenuItem
Set peControlType to xtpControlPopup
Set psCaption to "&Window"
Set psToolTip to "Window"
Set psDescription to "Display Current Views and set other display options."
// These are the static windows items. More will be created in onInitPopup
Object oDisplayOptionsMenu is a cCJMenuItem
Set peControlType to xtpControlPopup
Set psCaption to "&Display Options"
Set psToolTip to "Display Options"
Set psDescription to "Set display options"
Object oStatusbarMenu is a cCJStatusbarMenuItem
End_Object
Object oAutoArrangeIconsMenu is a cCJAutoArrangeIconsMenuItem
End_Object
Object oRestoreMenusMenu is a cCJRestoreMenusMenuItem
Set pbControlBeginGroup to True
End_Object
End_Object
Object oCascadeMenu is a cCJCascadeMenuItem
Set pbControlBeginGroup to True
End_Object
Object oHorizTile is a cCJTileHorizontally
End_Object
Object oVertTile is a cCJTileVertically
End_Object
Object oMinimizeMenuItem is a cCJMinimizeWindowsMenuItem
Set pbControlBeginGroup to True
End_Object
Object oRestoreMenuItem is a cCJRestoreWindowsMenuItem
End_Object
Object oArrangeIconsMenuItem is a cCJAutoArrangeIconsMenuItem
Set pbControlBeginGroup to True
End_Object
End_Object
The dynamic menus are added using the OnPopupInit event. You are encouraged to study this class as it provides a very useful example showing how dynamic menus may be added to a popup menu. The menu item's class OnPopupInit reference material (actually cCJAction) explains how dynamic menu items are added to a popup. This class provides a real world example of how that is implemented. Creating dynamic menus is also discussed in Using Menus, Toolbars and Statusbars
See Also