I have code attached to the ValueChanged event of two NumericUpDown controls:
private void numericUpDownHeight_ValueChanged(object sender, EventArgs e)
{
if (checkBoxRetainRatio.Checked)
{
numericUpDownWidth.Value = numericUpDownHeight.Value;
}
}
private void numericUpDownWidth_ValueChanged(object sender, EventArgs e)
{
if (checkBoxRetainRatio.Checked)
{
numericUpDownHeight.Value = numericUpDownWidth.Value;
}
}
This works dandy when I use the controls' up/down arrows to change the value in the edit box; but if I edit the value manually (e.g., when I want to change it from 100 to 25, and can do that in six keystrokes manually whereas, incrementing by 5, it would take 15 using the down arrow), the event does not fire.
Is there a quick way to fix this rather minor irritation (IOW, if it takes something really arcane and tricky to accomplish it, I won't bother).