I present the user a NumericUpDown control so he can specify the size of a texture. It is important that this texture is of power of two size (32, 64, 128…).
I have tried to force the control to present only this powers of two whenever you click the up or down buttons (or push the arrow keys) in the event ValueChanged without luck. I also have tried using the Increment property. All the solutions I have encountered by myself are either too hacky or have special case in which it shows invalid values.
Is there an easy way (or at least not too tricky) to achieve this behavior?
Thanks in advance.
You should inherit the
UpDownBaseclass.