I have a tool button and an assigned to it action. But the action doesn’t have an on click event, there is no code for a click. Therefor the button is disabled, how to change it to be enabled?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When an action has no
OnExecutehandler, the action is always disabled. If you want to assign an action to an object, and have that object be enabled, then you need to provide anOnExecutehandler.The question sounds a little odd though. Why would you have a button which, when pressed, does nothing? Do you perhaps, have an
OnClickhandler that is defined in the button rather than the action? If so then you should simply move that handler into the action and all will be well.Update
Ulrich helpfully points out that the
DisableIfNoHandlerofTActioncan be used to change the behaviour described above. Since this has public visibility and is not published, you have to make the change in code which is why I think I forgot about it.