Is it possible in WinForms to show a text inside a NumericUpDown control? For example I want to show the value in my numericupdown control is micro ampers so it should be li
Here's what I used for showing at least 2 digits for a hexadecimal NumericUpDown that are prefixed by 0x.
It puts text in the control and avoids using "debounce" by using the .Net provided
field ChangingText
class HexNumericUpDown2Digits : NumericUpDown
{
protected override void UpdateEditText()
{
if (Hexadecimal)
{
ChangingText = true;
Text = $"0x{(int)Value:X2}";
}
else
{
base.UpdateEditText();
}
}
}