Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - How Do I Right Click a menu item & get a popupmenu
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How Do I Right Click a menu item & get a popupmenu

 Post Reply Post Reply
Author
Message
LeeHayton View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 November 2005
Location: United Kingdom
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote LeeHayton Quote  Post ReplyReply Direct Link To This Post Topic: How Do I Right Click a menu item & get a popupmenu
    Posted: 06 November 2006 at 6:10am
I want to add the functionality to rename and delete items from a menu and so I need to know how to show a popupmenu when right clicking a menu item AND STILL have the menu visible behind the popupmenu.
 
Using the ControlRButtonUp display the popupmenu but hides the original menu control - in effect i need a ControlRButtonDOWN
 
Any ideas?
 
Thanks
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 06 November 2006 at 6:23am
Hello,
 
Catch
Private Sub CommandBars_ToolBarContextMenu(ByVal ToolBar As XtremeCommandBars.ICommandBar, ByVal ContextMenu As XtremeCommandBars.ICommandBar)
event
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
LeeHayton View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 November 2005
Location: United Kingdom
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote LeeHayton Quote  Post ReplyReply Direct Link To This Post Posted: 06 November 2006 at 6:37am
Thanks - but I don't think that fires on a right click of a menu item.
Back to Top
LeeHayton View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 November 2005
Location: United Kingdom
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote LeeHayton Quote  Post ReplyReply Direct Link To This Post Posted: 06 November 2006 at 6:42am
I need to have a popup menu at this level.
 
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 06 November 2006 at 7:14am
Oh. see now.
 
you need TPM_RETURNCMD Or TPM_RECURSE flags:
 
Private Sub CommandBars_ControlRButtonUp(ByVal Control As XtremeCommandBars.ICommandBarControl)
    If (Control.Id = ID_FILE_NEW) Then
        Dim Popup As CommandBar
        Dim Cmd As Integer
          
        Set Popup = CommandBars.Add("Popup", xtpBarPopup)
        With Popup.Controls
            .Add xtpControlButton, ID_EDIT_COPY, "&Copy", -1, False
            .Add xtpControlButton, ID_EDIT_PASTE, "&Paste", -1, False
        End With
   
        Cmd = Popup.ShowPopup(TPM_RETURNCMD Or TPM_RECURSE)

    End If
End Sub

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
LeeHayton View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 November 2005
Location: United Kingdom
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote LeeHayton Quote  Post ReplyReply Direct Link To This Post Posted: 06 November 2006 at 7:19am
Works a treat! Thanks.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.045 seconds.