CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Combo Boxes

  1. #1
    Join Date
    Dec 1999
    Posts
    6

    Combo Boxes

    Hi
    Disc:
    I need help on using 'combo boxes'. Any information will be
    welcomed.


  2. #2
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: Combo Boxes

    what is it you want to know? You add items to the list like this:

    Combo1.AddItem "Your Text Here"



    You can loop through all the items in the list like this:

    Dim x as Integer
    for x = 0 to Combo1.ListCount - 1
    MsgBox Combo1.List(x)
    next x



    If you want to know what item was just clicked...

    private Sub Combo1_Click()
    'the listindex property will give you the index of the item selected
    MsgBox Combo1.List(Combo1.ListIndex)
    End Sub



    The help file has some examples. and remember, always RTFM.

    Hope this helps,
    John

    John Pirkey
    MCSD
    www.ShallowWaterSystems.com
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured