Move Method (AMenu) |
Version 6 |
Moves a menu object to a new position.
Object.Move ( vMenuTo )
The Move method syntax has the following parts:
Name |
Type |
Description |
Object |
AMenu |
AMenu object |
vMenuTo |
Val Variant |
new position - this can be (1) menu name, (2) menu object, (3) menu index |
This method does not apply to the top-level menu, of type amenuTypeBar.
The following statement moves a menu to a position of menu "Edit Paste":
mnuEditPaste=mnu1.Find("Edit Paste")
mnuEditPasteBelow.Move(mnuEditPaste)
The following moves the menu 'menuUser' to iMenuIndex, if this index is not valid, then move at the end:
if iMenuIndex=-1 or iMenuIndex>=menuPopup.MenusCount()
iMenuIndex=menuPopup.MenusCount()-1
endif
menuUser.Move(iMenuIndex)