Library articles and tutorials

Combo Box

Styles

A combo box has three different styles:
0 - Dropdown Combo
1 - Simple Combo
2 - Dropdown List

Style 0 allows the user to either select an item on the dropdown list, or enter their own value.
combostyle0.gif (2141 bytes)

Style 1 allows the user to either select an item on the dropdown list, or enter their own value. However it looks more like a combination of a text box and list box.
combostyle0.gif (2141 bytes)

Style 2 only allows the user to select an item on the dropdown list
combostyle2.gif (2189 bytes)

AddThis

Comments

  1. 13 Apr 2007 at 00:09

    Try this:

    ComboBox1.Items.Add("Text")

    It's pretty flexible, you can put just about anything in there:

    ComboBox1.Items.Add("Text" & RichTextBox1.Text & someVariable & etc.)

     

    - Vincent

     

  2. 07 Mar 2004 at 04:41

    The .AddItem is to add items to the Combo Box at run time. This is normally the preferred way of doing this instead of doing it through the properties of the Combo Box.


    Usage:
    Combo1.AddItem "String"

  3. 11 Apr 2003 at 18:31

    Yeah, I was getting an error like "Invalid procedure call or argument" (Runtime error 5). It seems to work if I remove the index # (rather than Combo1.Additem "Blah" 2, just Combo1.Additem "Blah").

  4. 06 Aug 2002 at 12:43

    Combo1.AddItem tells me that it's a wrong code.

Leave a comment

Sign in or Join us (it's free).

Related discussion