num_length.Focus(); UpDownBase updbText = (UpDownBase)num_length; num_length.Select(0, updbText.Text.Length);