Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
625
Adding items dynamically in BeforeToolDropDown...
posted

I'm having some trouble with this...

 

I'm trying to control what items will appear in the menu when a user right clicks over my grid.  This code is used in other places in the application and seems to work; but in this particular instance only the tools that are of type 'PopupMenuTool' appear.  I have some StateButtonTools and some ButtonTools are coded to appear - but they just don't show up.

Here is the code I use to show a PopupMenuTool - this works great....

mnuPopUp = CType(mnuRCGridMenu.Tools("Test1"), Infragistics.Win.UltraWinToolbars.PopupMenuTool)
mnuPopUp.SharedProps.Visible = True

 

But when I try the same thing with a StateButtonTool - it doesn't appear for the user...

sbItem = CType(mnuRCGridMenu.Tools("Test2"), Infragistics.Win.UltraWinToolbars.StateButtonTool)
sbItem.SharedProps.Visible = True

Using a debugger, I've set a breakpoint after the two lines immediately above this text and I find that 'sbItem.VisibleResolved' is 'False'.  But it's SharedProps.Visible is true.  I don't know what else could be hiding it.

sbItem.EnabledResolved is true.

sbItem.OwningMenu.VisibleResolved is true.

Does anyone have any thoughts or suggestions on why these item's might not be showing?