J
Joe Cool
I am trying to force a numericupdown control to display leading zeros.
The maximum is less than 100, so the displayed value will always be a
two digit number or less. So I have overridden the OnValueChanged
Event with the following code;
protected override void OnValueChanged(EventArgs e)
{
base.OnValueChanged(e);
if (Value < 9)
Text = Value.ToString("00");
}
But it doesn't work. Can anyone spot the problem?
The maximum is less than 100, so the displayed value will always be a
two digit number or less. So I have overridden the OnValueChanged
Event with the following code;
protected override void OnValueChanged(EventArgs e)
{
base.OnValueChanged(e);
if (Value < 9)
Text = Value.ToString("00");
}
But it doesn't work. Can anyone spot the problem?