System.Windows.Forms.ListView.SetFocusedItem C# (CSharp) Method

SetFocusedItem() private method

private SetFocusedItem ( int display_index ) : void
display_index int
return void
		private void SetFocusedItem (int display_index)
		{
			if (display_index != -1)
				GetItemAtDisplayIndex (display_index).Focused = true;
			else if (focused_item_index != -1 && focused_item_index < items.Count) // Previous focused item
				GetItemAtDisplayIndex (focused_item_index).Focused = false;
			focused_item_index = display_index;
			if (display_index == -1)
				OnUIAFocusedItemChanged ();
				// otherwise the event will have been fired
				// when the ListViewItem's Focused was set
		}
		
ListView