Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Simple Reference
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Simple Reference

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


Joined: 16 May 2008
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote griswald88 Quote  Post ReplyReply Direct Link To This Post Topic: Simple Reference
    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!
Back to Top
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post 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

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