System.Windows.Forms.ListBox.ClearSelected C# (CSharp) Method

ClearSelected() public method

public ClearSelected ( ) : void
return void
		public void ClearSelected()
		{
			selected_indices.Clear ();
			tableView.SelectRows(new NSIndexSet(),false);	
		}
		

Usage Example

Example #1
0
 public static bool Intercambiar(ListBox listaA, ListBox listaB, Stack destino, Stack origen)
 {
     Object item = listaB.SelectedItem;
     if (item.ToString() != origen.Peek().ToString())
     {
         MessageBox.Show("El elemnto no se puede mover", "Torres de Hanoi", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         listaB.ClearSelected();
     }
     else{
         if (destino.Count == 0 || ((int)origen.Peek() < (int)destino.Peek()))
         {
             listaA.Items.Insert(0, item);
             listaB.Items.Remove(item);
             destino.Push(origen.Peek());
             origen.Pop();
             return true;
         }
     else
         {
             MessageBox.Show("Movimiento no valido", "Torres de Hanoi", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
             listaB.ClearSelected();
         }
     }
     return false;
 }
All Usage Examples Of System.Windows.Forms.ListBox::ClearSelected