![]() |
How Do I Right Click a menu item & get a popupmenu |
Post Reply ![]() |
Author | |
LeeHayton ![]() Senior Member ![]() ![]() Joined: 25 November 2005 Location: United Kingdom Status: Offline Points: 102 |
![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hello,
Catch
Private Sub CommandBars_ToolBarContextMenu(ByVal ToolBar As XtremeCommandBars.ICommandBar, ByVal ContextMenu As XtremeCommandBars.ICommandBar)
event |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
LeeHayton ![]() Senior Member ![]() ![]() Joined: 25 November 2005 Location: United Kingdom Status: Offline Points: 102 |
![]() ![]() ![]() ![]() ![]() |
Thanks - but I don't think that fires on a right click of a menu item.
|
|
![]() |
|
LeeHayton ![]() Senior Member ![]() ![]() Joined: 25 November 2005 Location: United Kingdom Status: Offline Points: 102 |
![]() ![]() ![]() ![]() ![]() |
I need to have a popup menu at this level.
![]() |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
LeeHayton ![]() Senior Member ![]() ![]() Joined: 25 November 2005 Location: United Kingdom Status: Offline Points: 102 |
![]() ![]() ![]() ![]() ![]() |
Works a treat! Thanks.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |