I am using the UltraToolbar in my UltraGrid and I added some Tools[which I think are basically like menu items]. But I would like to hide some Tools[menu items] in certain circumstances. I dont see a easy way[couldnt find one at all] to do it. Could somebody point me in the right direction?. Here is my typical use case.
I have a menu like this in UltraGrid
Options
SubOption1
SubOption2
Now the issue is that I want to disable SubItem1[which is a button tool item] to start with and enable it when I need. Thanks
this.ultraToolbarsManager1.Tools["SubOptions1"].SharedProps.Enabled = false;
That doesnt seem to do anything. Could htis be a bug or is thre any other setting thats overriding it?
Yes, actually I found that out after reading this about 30 seconds ago :)
http://forums.labs.infragistics.com/readmessage?id=%3C3dc72a4$fa42ffb$184aae@news.infragistics.com%3E&group=infragistics.products.netadvantage.windowsforms.wintoolbars
Is the tool in the Ribbon? By default, tools in the ribbon cannot be hidden because it would violate the Office 2007 UI Guidelines which state that the contents of a ribbon tab cannot change based on state. If you would like to relax this restriction, set UltraToolbarsManager.Office2007UICompatibility to False.
I know this thread is a year old, but I wanted to mention that tools("name").SharedProps.Visible = False does the same thing for me. The tool is disabled, NOT made invisible.
Using SharedProps.Visible = False does not hide the tool for me--it only disables it (grayed out).
How do I hide an individual tool completely?
I saw another post that suggested that I should use myToolBarManager.Tools[1] instead of myToolBarManager.Tools to do this; however, the Tools collection on my toolbarmanager instance is null.
Thanks.
To hide the tool, use ...SharedProps.Visible = False etc instead of Hidden = false (which isn't an option!)