Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - right click pop up menu
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

right click pop up menu

 Post Reply Post Reply
Author
Message
paulhaggo View Drop Down
Groupie
Groupie


Joined: 21 June 2018
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote paulhaggo Quote  Post ReplyReply Direct Link To This Post Topic: right click pop up menu
    Posted: 25 July 2018 at 11:23am
Hello

I have the made a right click menu creation code in vb6, which works fine, however when i make a submenu like so

Set oPopup = oBar.Controls.Add(xtpControlPopup, 1, "Sub Menu")
With oPopup.CommandBar.Controls
.Add xtpControlButton, 1, "Test 123"
End With

it works and makes a submenu on the popup, with 1 item on the submenu

However I have made my function so that you call it for each item you want adding to the menu, but if you call the above code twice, you, of course, get 2 submenus and not 2 items on 1 submenu

so does anyone know how to add an item to a submenu which is already created, I know I can do the following

Set oPopup = oBar.Controls.Add(xtpControlPopup, 1, "Sub Menu")
With oPopup.CommandBar.Controls
.Add xtpControlButton, 1, strMenuCaption
.Add xtpControlButton, 1, strMenuCaption
End With

however I do not send all items at once to the function, so this does not work with my current setup

I just want to be able to do this line

.Add xtpControlButton, 1, strMenuCaption

without it make a new submenu each time, but that needs the oBar.Controls, which i can not create without make another submenu

cheers Smile

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.219 seconds.