I have several toolitems that I want to enable/disable based on which MPart the user selected. How can I accomplish that ?
Share
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.
You can add the following code to the handler of your toolbar items:
@CanExecute is called before the handled entry is shown in menus or toolbars. If an entry cannot be executed, its state is set to “disabled”.
In the above code, the active part is injected and can then be used to determine the handler’s executable state.