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
20
How do I disable a toolbar button?
posted

I'm using the following code and get a error message stating "Key not found." 

Here is the code:

this.ToolbarsManager.Toolbars["m_toolBar"].Tools["Add User"].Control.Enabled = false; 

I'ne also tried

this.ToolbarsManager.Toolbars["m_toolBar"].Tools["Add User"].SharedProps.Enabled = false;

I've put Add User in the tag and in the tag and key including the SharedProps tag.

Can anyone help?