Question

Is there a way to prevent a tool strip drop down button from being selected (without disabling it)?

I see it has a property called CanSelect, but it's read-only.

As for my second question related to this control:

Is there a way to hide the drop down symbol (black rectangle pointing down) of a tool strip drop down button?

I want to prevent it from being selected and to hide the drop down symbol to make the button act like a status strip icon next to the status label. If you can give suggestions on this, it would be much appreciated.


I didn't realise that the tool strip status label allows for images... That way I do not need to fake it with the control. Thank you all.

Was it helpful?

Solution

Question: Is there a way to hide the drop down symbol (black rectangle pointing down) of a tool strip drop down button?

paste the code in form constructor.

toolStripDropDownButton1.ShowDropDownArrow = false;

OTHER TIPS

A little trickier but try to overlaying it with some control over it with opacity almost but not equal to 0.

I think the problem is that you are trying to use the wrong controls for what your trying to convey to your user.

Button: If a button is not meant to be interacted with you should disable it, that is the common metaphor in software. What you want to do in the way of styling is your prerogative. Alternatively you could just handle the focus and do nothing. However if your click does nothing and the button is not disabled your users will be confused.

DropDownButton: It seems like what your trying to do here is programmatic control what button action is available to the user, but do not want to let them change what action they can initiate. If that is the case, you should consider having multiple buttons here that are hidden with the exception of the one you want shown at the time. This will give the user a clear expectation of the behavior.

Obviously I'm making some assumptions here but in order to give a more detailed response I would need more details about the specific reason you want to do this to understand why you are approaching it this way.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top