Clear a list box? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Clear a list box?

Panesonic158Panesonic158 Posts: 3Member
How do you clear a list box. I have my results displayed in a list box and I made a clear button but I'm not sure how to clear all the contents in a list box

Comments

  • dokken2dokken2 Posts: 532Member
    : How do you clear a list box. I have my results displayed in a list box and I made a clear button but I'm not sure how to clear all the contents in a list box
    :
    Invoke the Clear method: ListBox1.Items.Clear()

  • LApcguyLApcguy Posts: 1Member
    : How do you clear a list box. I have my results displayed in a list box and I made a clear button but I'm not sure how to clear all the contents in a list box
    :
    Did you mean a textbox?
    if so you would do something like this:

    under the Clear Button in code view you would write

    textboxName.text = "" (what ever you named it)
    hope this helps

Sign In or Register to comment.