Click or drag to resize

MenuSelectEvent Class (Typed)

X#
Provide information about a MenuSelectEvent, generated whenever a menu item is highlighted on a menu (menu items are highlighted as the user moves either the mouse or the highlight bar up or down a menu).
Inheritance Hierarchy
Object
  Event
    MenuEvent
      MenuSelectEvent

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VOGUIClasses (in XSharp.VOGUIClasses.dll) Version: 2.19
Syntax
 CLASS MenuSelectEvent INHERIT MenuEvent
Request Example View Source

The MenuSelectEvent type exposes the following members.

Constructors
  NameDescription
Public methodMenuSelectEvent
Initializes a new instance of the MenuSelectEvent class
Top
Properties
  NameDescription
Public propertyHandle (Inherited from Event.)
Public propertyhWnd (Inherited from Event.)
Public propertyHyperLabel (Inherited from MenuEvent.)
Public propertyItemID (Inherited from MenuEvent.)
Public propertylParam (Inherited from Event.)
Public propertyMenu
The Menu object that generated this MenuSelectEvent.
(Inherited from MenuEvent.)
Public propertyMessage (Inherited from Event.)
Public propertyName
A string representing the name stored in the hyperlabel of the menu items that generated this MenuSelectEvent.
(Inherited from MenuEvent.)
Public propertyNameSym (Inherited from MenuEvent.)
Public propertyoWindow (Inherited from Event.)
Public propertyuMsg (Inherited from Event.)
Public propertyWindow (Inherited from Event.)
Public propertywParam (Inherited from Event.)
Top
Functions
  NameDescription
Public methodAsString (Inherited from MenuEvent.)
Top
Remarks
MenuSelectEvent events enable the program to anticipate that the user can activate an item or to provide status information.
Tip Tip
When a menu item is actually selected (and therefore executed), the system generates a MenuCommandEvent.
When an accelerator key is executed, a MenuSelectEvent, immediately followed by a MenuCommandEvent, is generated to simulate the mouse route—the various selections that you have to pass over to choose the option. (Thus, the accelerator generates the same event as those generated with a mouse.)
Examples
The following example prints a different help line in the status bar, depending on which command is currently selected:
X#
 1CLASS MyWindow INHERIT TopAppWindow
 2METHOD MenuSelect(oMSE) CLASS MyWindow
 3LOCAL j := oMSE:ItemID
 4DO CASE
 5CASE j = IDMI_RED
 6TextPrint("Select the Red Pen", Point{10,10})
 7CASE j = IDMI_GREEN
 8TextPrint("Select the Green Pen", Point{10,10})
 9CASE j = IDMI_BLUE
10TextPrint("Select the Blue Pen", Point{10,10})
11ENDCASE
See Also