System.Windows.Forms.ComboBox.SetSelectedIndex C# (CSharp) Method

SetSelectedIndex() private method

private SetSelectedIndex ( int value, bool supressAutoScroll ) : void
value int
supressAutoScroll bool
return void
		void SetSelectedIndex (int value, bool supressAutoScroll)
		{
			if (selected_index == value)
				return;
			
			if (value <= -2 || value >= Items.Count)
				throw new ArgumentOutOfRangeException ("SelectedIndex");
			
			selected_index = value;
			//TODO: Test
			textbox_ctrl.IntValue = value;
			
			OnSelectedValueChanged (EventArgs.Empty);
			OnSelectedIndexChanged (EventArgs.Empty);
			OnSelectedItemChanged (EventArgs.Empty);
		}
		#endregion