Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - ActiveMenuBar.FindControl (ActiveX 8.6)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ActiveMenuBar.FindControl (ActiveX 8.6)

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


Joined: 09 November 2003
Status: Offline
Points: 84
Post Options Post Options   Thanks (0) Thanks(0)   Quote robs Quote  Post ReplyReply Direct Link To This Post Topic: ActiveMenuBar.FindControl (ActiveX 8.6)
    Posted: 01 January 2004 at 12:11pm

Does anybody know how to find a menu through code when it's not a top-level menu item?

CommandBars.ActiveMenuBar.FindControl won't work because menus (controls of type xtpControlPopUp) all have an ID of 0 for some reason.
CommandBars.ActiveMenuBar.Controls.Count only has the count for top-level menu items.

Dim Control As XtremeCommandBars.CommandBarControl
For Each Control in CommandBars.ActiveMenuBar.Controls
  Debug.Print Control.Caption
next

Only lists the top-level menu items

I'm stumped. Every time I get by one obsticle I hit another. I was going to just use the .DescriptionText property of the menus to store ID's since the .ID property doesn't work, but if there is no way to cycle through the controls collection, it must be impossible.

What would be so dificult about making the .ID property for xtpControlPopup controls work?

Any ideas are appreciated. Yes, I've looked at the Dynamic Popups sample. CommandBars_InitCommandsPopup is just silly. That only allows access to menus as they are clicked.

Thanks!

Back to Top
robs View Drop Down
Groupie
Groupie


Joined: 09 November 2003
Status: Offline
Points: 84
Post Options Post Options   Thanks (0) Thanks(0)   Quote robs Quote  Post ReplyReply Direct Link To This Post Posted: 01 January 2004 at 1:21pm

I guess the answer to my own questions is that controls that are not top-level popups should be xtpControlButtonPopUp and not xtpControlPopUp. The .id property does work on xtpControlButtonPopup and .FindControl will find them.

 

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 03 January 2004 at 2:29am

You are right, you must set id manually in xtpControlPopup controls.

Control.Id = 20

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
future View Drop Down
Newbie
Newbie


Joined: 22 August 2007
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote future Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2007 at 6:01am
hi there ,Would u mind to provide some code that we can find the sub-menus, i am stock here as well, Thank u very much
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.141 seconds.