Print Page | Close Window

Simple Reference

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=10873
Printed Date: 07 October 2024 at 8:28pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Simple Reference
Posted By: griswald88
Subject: Simple Reference
Date Posted: 02 June 2008 at 5:04pm
I am fairly new to CommandBars, but I seem to always have trouble referencing certain sub menus.  I have actions in place and that works great, but if I wanted to update/populate a sub-menu OF another sub-menu WITHOUT using the update event, how do I reference the menu.  In other words, I have a "file" menu that has a "recent files" sub-menu. In order to populate the "recent files" sub-menu I need to reference it. Now ALL my menus have unique IDs, but I can't seem to get a reference to the menu item. I want to avoid using the FindControl because apparently that is not the best approach. Thanks!



Replies:
Posted By: ijwelch
Date Posted: 02 June 2008 at 8:31pm
Hi,

You can use the CommandBars_InitCommandsPopup event which fires when the sub menu is about to be shown.

Check the ID of the sub menu using CommandBar.Parent.ID and populate with CommandBar.Controls.Add

Cheers




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