title: show/ hide items in the listbox
body: <p>I make a listbox and it works perfectly, I also made a search function, but I want to hide the items in the listbox and show them only when searched through index.
  here is my code for adding items</p>
  
  <pre><code>private void Savebtn_Click(object sender, EventArgs e)
  {
      addTolist(gatherItem());
      refreshView();
  }
  
  private void addTolist(Person p)
  {
      Person.listperson.Add(p);
  }
  
  private void refreshView()
  {
      listBox1.Items.Add(getItem());
  }
  
  private String getItem()
  {
      String result = null;
      foreach (Person p in Person.listperson)
      {
          result = p.lastname;
      }
      return result;
  }
  </code></pre>
  
  <p>and this is my code for search</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
  {
      int index = listBox1.FindString(textBox6.Text);
      if (0 &lt;= index)
      {
          listBox1.SelectedIndex = index;
      }
  }
  </code></pre>
  
  <p>Is there a way for this? thanks :)</p>