Simple Reference |
Post Reply |
Author | |
griswald88
Groupie Joined: 16 May 2008 Status: Offline Points: 27 |
Post Options
Thanks(0)
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!
|
|
ijwelch
Senior Member Joined: 20 June 2006 Status: Offline Points: 262 |
Post Options
Thanks(0)
|
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 |
|
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 |