Click or drag to resize

Menu.InsertItem Method

X#
Insert a new menu item before a specified menu item.

Namespace:  VO
Assembly:  VOGUIClasses (in VOGUIClasses.dll) Version: 2.21
Syntax
 VIRTUAL METHOD InsertItem(
	nItemID,
	xNewItem,
	nBeforeID
) AS USUAL CLIPPER
Request Example View Source

Parameters

nItemID (Optional)
Type: Usual
The ID of the new menu item or the sub-menu to add (simply another Menu object). This is how to construct hierarchical menus.
xNewItem (Optional)
Type: Usual
One of the following: cNewItem The caption of the new menu item. oHyperLabel The hyperlabel containing the caption to appear as the new menu item. oBitmap The bitmap to appear for the new menu item.
nBeforeID (Optional)
Type: Usual
The ID of the menu item before which the new item should be inserted.

Return Value

Type: Usual
TRUE if successful; otherwise, FALSE.
Remarks
After inserting a new item to a menu, you must reassign the menu to the owner window's Menu property for the change to take effect.
See Also