Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.