Results 1 to 4 of 4

Thread: Multiple Select in ComboBox [VB6]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2003
    Posts
    308

    Question Multiple Select in ComboBox [VB6]

    Given a Form [Form1] with a ComboBox [cbText].
    Currently the ComboBox is a dropdown that allows the user to select one of the choices, what I need is to extend this behavior so that the user can (if required) select more then one of the choices at a time.

    Something similar to holding down Ctrl and selecting multiple choices from the list.
    Can this be done?

    Also what effect will this have on the display?
    Meaning, currently the cbText starts blank, I click the dropdown arrow and pick a choice, this choice is then placed in the cbText. What happens if I have multiple Selections? What is placed in the cbText combobox (that we see)?

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Can't be done with a drop down but can be done with a list box, MiltiSelect= True.

    TG
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492

    Re: Multiple Select in ComboBox [VB6]

    Originally posted by Shaitan00
    Given a Form [Form1] with a ComboBox [cbText].
    Currently the ComboBox is a dropdown that allows the user to select one of the choices, what I need is to extend this behavior so that the user can (if required) select more then one of the choices at a time.

    Something similar to holding down Ctrl and selecting multiple choices from the list.
    Can this be done?

    Also what effect will this have on the display?
    Meaning, currently the cbText starts blank, I click the dropdown arrow and pick a choice, this choice is then placed in the cbText. What happens if I have multiple Selections? What is placed in the cbText combobox (that we see)?
    Combo box can show the items, list box will store them
    Real simple...create a combo on top of a list box. Load the values in the combo box. In the combo box click event do this:

    lstBox.AddItem cbo.Text, index

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2003
    Posts
    308
    Not 100% sure I follow you jhermiz.
    Why would I need a List box AND a Combo box to accomplish this task? Can't I just replace the current Combo Boxes with List Boxes and Enable the Multiple Select?

    Is there a huge difference (functionality wize) between the list and combo boxes that would warrent using both?
    (note that my combo boxes are deeply integrated into my application, is it that big of a change?)

    Please elaborate.

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