GefContextMenuItem.SetActionToPointTarget (method)

Makes the menu item trigger a point target command.
Syntax: Boolean = object.SetActionToPointTarget ( PointTargetIndex )
PointTargetIndex As long -
Description: The SetActionToPointTarget makes the menu item trigger a point target command. It may return False of the index is out of range. The default valid values are 0, and 1. If additional point targets have been installed other values will be valid.


Sub OnPreContextMenu(oContextMenu As GefContextMenu)
  Dim oContextMenuItem As GefContextMenuItem
  Dim oMenuItems As GefContextMenuItems
  Set oMenuItems = oContextMenu.MenuItems
  Dim oSubMenu As GefContextMenu
  Dim oSubMenuItem As GefContextMenuItem
  Set oContextMenuItem = oMenuItems.Add
  oContextMenuItem.Text = "Point Targets"
  Set oSubMenu = oContextMenuItem.SubMenu
  Set oSubMenuItem = oSubMenu.MenuItems.Add
  oSubMenuItem.SetActionToPointTarget 0
  oSubMenuItem.Text = "Point Control Panel"
  Set oSubMenuItem = oSubMenu.MenuItems.Add
  oSubMenuItem.SetActionToPointTarget 1
  oSubMenuItem.Text = "Quick Trend"
End Sub