I think the problem is that you are trying to use the wrong controls for what you are trying to pass to your user.
Button: If the button is not designed to interact with you, you must disable it; this is a common metaphor in software. What you want to do in the styling method is your prerogative. Alternatively, you can just focus and do nothing. However, if your click does nothing and the button is not disabled, your users will be confused.
DropDownButton: It looks like you are trying to do this, it is a programmatic control of which button action is available to the user, but do not want them to change the action that they can trigger. If so, you should consider that there are several buttons that are hidden, except for the one you want to show at that time. This will give the user an explicit expectation of behavior.
Obviously, I am making some assumptions here, but in order to give a more detailed answer, I will need more detailed information about the specific reason why you want to do this in order to understand why you are approaching it this way.
source share