Community
Showing results for 
Search instead for 
Do you mean 
Reply

Where can I find the context menu in the registry

Nickel Contributor
Posts: 493
Country: USA

Where can I find the context menu in the registry

Hello!  I am looking to find where in the registry is the context menu?  I am looking to add additional commands there to give me greater flexibility.

 

Any help would be appreciated.

 

-P

Nickel Super Contributor
Posts: 441
Country: UK

Re: Where can I find the context menu in the registry

I may be wrong but I don't think its in the registry I believe its embedded into the program.

 

Tom

Nickel Contributor
Posts: 493
Country: USA

Re: Where can I find the context menu in the registry

Thanks, but Abacus(Actpresentation) and CRM-Service add information to the context menu.  I see it on my screen right now when I right click on the screen.

 

Can I get into the context menu?  Others can.  Why can't I?  It's not sacrosanct.

Bronze Super Contributor
Posts: 1,231
Country: USA

Re: Where can I find the context menu in the registry

I wrote this code in a free add-on that extended the Group TreeView menu to include "Exapnd All" "Collapse All"

 

I lifted the code directly, hope this helps

-- jim durkin

 

 

  Public Shared Sub ACTAPP_CurrentViewChanged(ByVal Sender As Object, ByVal e As System.EventArgs)

        Select Case ACTAPP.CurrentViewName
            Case "Act.UI.IGroupDetailView"
                '----------------------------------
 

                 '----------------------------------
                ' we are on the GroupDetail View in ACT!
                '----------------------------------
                Try
                    '------------------------------------------
                    ' Find the TreeView control
                    '------------------------------------------
                    vTreeGroup = FindControlMutableTree("virtualTree1", ACTAPP)
                    
                    '------------------------------------------
                    ' Have we already been added
                    '------------------------------------------
                    If Not vTreeGroup Is Nothing Then


                        If CType(vTreeGroup.ContextMenu, System.Windows.Forms.ContextMenu).MenuItems.IndexOf(GroupTreeViewMenu) = -1 Then

                            '------------------------------------------
                            ' Create the menu and set some of attributes
                            '------------------------------------------
                            GroupTreeViewMenu = New IconMenuItem("Group Tree", CType(GetEmbeddedIcon("TreeView16.ico"), Icon), New EventHandler(AddressOf OnMenuItemClick), Nothing)
                            GroupExpandAllMenu = New IconMenuItem("Expand All", CType(GetEmbeddedIcon("PlusSign.ico"), Icon), New EventHandler(AddressOf OnMenuItemClick), Nothing)
                            GroupCollapseAllMenu = New IconMenuItem("Collapse All", CType(GetEmbeddedIcon("MinusSign.ico"), Icon), New EventHandler(AddressOf OnMenuItemClick), Nothing)
                            GroupAllowDragMenu = New IconMenuItem("Allow Drag and Drop", Nothing, New EventHandler(AddressOf OnMenuItemClick), Nothing)
                            GroupAboutMenu = New IconMenuItem("About Durkin...", Nothing, New EventHandler(AddressOf OnMenuItemClick), Nothing)

                            '
                            GroupSeperatorMenu1 = New SeperatorMenuItem("-")
                            GroupSeperatorMenu2 = New SeperatorMenuItem("-")


                            ' Disallow Drag and Drop
                            If Preferences.GetValue("AllowDragGroup") <> "TRUE" Then
                                vTreeGroup.Columns(0).Movable = False
                                vTreeGroup.AllowDrop = False
                            Else
                                GroupAllowDragMenu.Checked = True
                            End If

                            ' Add the Top Menu
                            vTreeGroup.ContextMenu.MenuItems.Add(vTreeGroup.ContextMenu.MenuItems.Count, GroupTreeViewMenu)

                            ' Add the SubMenus
                            vTreeGroup.ContextMenu.MenuItems(vTreeGroup.ContextMenu.MenuItems.IndexOf(GroupTreeViewMenu)).MenuItems.Add(GroupExpandAllMenu)
                            vTreeGroup.ContextMenu.MenuItems(vTreeGroup.ContextMenu.MenuItems.IndexOf(GroupTreeViewMenu)).MenuItems.Add(GroupCollapseAllMenu)
                            vTreeGroup.ContextMenu.MenuItems(vTreeGroup.ContextMenu.MenuItems.IndexOf(GroupTreeViewMenu)).MenuItems.Add(GroupSeperatorMenu1)
                            vTreeGroup.ContextMenu.MenuItems(vTreeGroup.ContextMenu.MenuItems.IndexOf(GroupTreeViewMenu)).MenuItems.Add(GroupAllowDragMenu)
                            vTreeGroup.ContextMenu.MenuItems(vTreeGroup.ContextMenu.MenuItems.IndexOf(GroupTreeViewMenu)).MenuItems.Add(GroupSeperatorMenu2)
                            vTreeGroup.ContextMenu.MenuItems(vTreeGroup.ContextMenu.MenuItems.IndexOf(GroupTreeViewMenu)).MenuItems.Add(GroupAboutMenu)

                            ' Add the Popup Handler
                            ' TODO
                            ' AddHandler vTreeGroup.ContextMenu.Popup, AddressOf vTreeGroup_ContextMenu_Popup

                        End If
                    End If

                Catch ex As Exception
                    'Log your error here
                End Try
    Case ELSE