Print Page | Close Window

right click pop up menu

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=23686
Printed Date: 28 March 2024 at 9:30pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: right click pop up menu
Posted By: paulhaggo
Subject: right click pop up menu
Date 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




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net