Question

I'm looking to add a numeric up / down control to a .Net StatusStrip. Unfortunately, it isn't listed as an option in the UI designer. Is there a way to do this?

Was it helpful?

Solution

You can use a ToolStripControlHost class to host a custom ( NumericUpDown for now ) class. You can also derive from this class "NumericUpDownToolStripItem" which initialize the "Control" property with the custom control and can populate next properties from the hosted control ( Min, Max, Value - for example ).

OTHER TIPS

You could try adding 3 ToolStripStatusLabels, set the Image of the first to an "Up Arrow" and the Image of the Third to "Down Arrow". Blank their Text properties.

The Middle one can hold the Number, which you increase/decrease in the Click Events.

Edit: Left/Right Arrows would probably look better. Left for Down, Right for Up.

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