Hello,
my question is how i can hide a specific tool from a ribbon group at runtime. I use the visible property but the tool becomes disabled and not hidden. I can hide the ribbon group but not a tool from the ribbon group.
Thanks
Hello vmitrop,
The behavior you are looking for is available when the Office2007UICompatibility property of the ultraToolbarsManager is set to false. If you are doing so some elements are always visible even if they are disabled.
You could read about the capabilities at the following link: http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.1/CLR2.0/HTML/Win_Using_Microsoft_Office_2007_UI_Capabilities.html
You could see the part you are intrested in, it says:
Please note, we are making efforts to ensure all posts are addressed by an Infragistics expert. We believe that the other community members could benefit from this thread as well.
Feel free to write me if you need further assistance.
This line of code you wrote makes the tool invisible. So it works but if i set Office2007UICompatibility to false, then a toolbar appears below the ribbon. Do you know why or how i can hide this too ? When i try to set its visible property to false i get an error from Visual Studio.
UltraToolbarsManager1.Ribbon.Tabs(0).Groups(0).Tools(9).SharedProps.Visible = false;
Here is my code. Tool is still visible
UltraToolbarsManager1.Office2007UICompatibility = False
UltraToolbarsManager1.Ribbon.Tabs(0).Groups(0).Tools(9).CustomizedVisible = Infragistics.Win.DefaultableBoolean.False
Any suggestion ?
set the Office2007UICompatibility to false
ultraToolbarsManager1.Office2007UICompatibility = false;
then use the visibility property
hope this helps