Combo Box Question


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Combo Box Question

  1. #1
    PhilipL Guest

    Combo Box Question


    I have 10 combo boxs that will have the same items inside (y,n,n/a). How can
    I loop through them all and place the items inside without doing one at a
    time.

    Thanks in advance..

  2. #2
    Kenny Acock Guest

    Re: Combo Box Question


    Philip,

    >I have 10 combo boxs that will have the same items inside (y,n,n/a). How

    can
    >I loop through them all and place the items inside without doing one at

    a
    >time.


    There's no "magic" way of doing this. Here are a couple of ways to fill
    the combo boxes:

    1. Design Time: You can add items to a combo box at design time. Add your
    items to one combo box, using the List property. Use Ctrl-Enter to start
    a new line. Each line will be one entry. Once you are done with the first
    item, you can select and copy the list, and then paste it into the other
    combo boxes, using the List property.

    2. Run Time: Create a sub-routine that will add the items, and pass each
    combo box into the sub-routine.

    --Kenny

  3. #3
    Willy Van den Driessche Guest

    Re: Combo Box Question

    "Kenny Acock" <kennya@teacherspal.com> wrote in message
    news:3b990f9a$1@news.devx.com...
    >
    > Philip,
    >
    > >I have 10 combo boxs that will have the same items inside (y,n,n/a). How

    > can
    > >I loop through them all and place the items inside without doing one at

    > a
    > >time.

    >
    > There's no "magic" way of doing this. Here are a couple of ways to fill
    > the combo boxes:
    >
    > 1. Design Time: You can add items to a combo box at design time. Add

    your
    > items to one combo box, using the List property. Use Ctrl-Enter to start
    > a new line. Each line will be one entry. Once you are done with the

    first
    > item, you can select and copy the list, and then paste it into the other
    > combo boxes, using the List property.
    >
    > 2. Run Time: Create a sub-routine that will add the items, and pass each
    > combo box into the sub-routine.

    Or use a control array
    dim objCombo as comboBox
    for each objCombo in myCombo
    Do step 1 of Kenny
    next
    >
    > --Kenny



    --
    Van den Driessche Willy
    For a work in progress :
    http://users.skynet.be/wvdd2/index.html



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center