I’m using NumericUpDown controls in my Max tools as a replacement for spinners. I’ve even got the click and drag functionality working for quickly changing the value.
But there’s one thing that bugs me. Querying the .value property of the control always returns an integer, even if it’s set up with multiple decimal places and a fractional increment. The problem is that the value type is a Decimal, which is converted to Integer in Max. Why, I don’t know. But in order to get the same value displayed in the control, I have to use <control>.Text as float.
Getting the text and converting to a float seems messy and adds unnecessary overhead to using this type of control. Has anyone else been using these and found a way around having to do the extra conversion? Or is it possible to create a custom control based on the NumericUpDown that returns a float instead of the decimal?