-
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..
-
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
-
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
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks