public IntegerInput(int initialValue, int inputMax) { InitializeComponent(); fallbackValue = initialValue; ClosingOk = false; NumUpDown.Maximum = inputMax; NumUpDown.Value = initialValue; NumUpDown.Select(0, NumUpDown.Value.ToString().Length); }
private void NumUpDown_Focus(object sender, EventArgs e) { NumUpDown.Select(0, NumUpDown.Text.Length); }