clear combo box

Discussion in 'Bug Reports' started by tremara1, Jan 3, 2009.

  1. tremara1

    tremara1 Active Member Licensed User

    When I use a combo box and clear it the list is cleared but the last value displayed is not cleared. Anyone else have this problem. A simple example has been uploaded.
     
  2. klaus

    klaus Expert Licensed User

    This is the 'normal' behaviour of the ComboBox.
    To clear the text, you must add following code
    cb.Text=""

    Or, you could use a ListBox.

    Best regards.
     
  3. tremara1

    tremara1 Active Member Licensed User

    combo clear

    Thanks Klaus, The text property is not in the auto complete so I did not try it.
    Still Learning.........................

    tremara
    Ballarat Victoria,Australia
     
  4. klaus

    klaus Expert Licensed User

    The ComboBox is a Combination of a ListBox and a TextBox.
    cb.Clear clears the listbox and
    cb.Text="" clears the textbox.

    Best regards.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice