Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 439
  • Last Modified:

Clone a ComboBox in VB6

I have a form with 20 comboboxes, all of the have the same information, i am full them with a query result, but my question is, is there a way i can clone one of the (the first)? and i don´t have to loop trought all in order to fill the 20 comboboxes.
0
emviruena
Asked:
emviruena
  • 4
  • 3
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
why not fill them "at once" instead of filling them 1 by 1?
you could of course "copy" all the items of the first into all the others, but why loop several times?
0
 
emviruenaAuthor Commented:
i fill them "at once", but still be so slow.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
how many items are there in the lists?
can you show the relevant code?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
emviruenaAuthor Commented:
The list is result of a query, they are almost 1000 items.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>they are almost 1000 items.

well, that's 2 problems at once.
first of all, that WILL take some time to be loaded: in total 20K items...

secondly, and that's the primary problem: as a user, I would HATE software that let's me choose among 1000 items in a drop-down list !!!!!
much more user-friendly would be some alternative solution, like a filtering text-box, where after typing for example 1-2 characters, the combo/list will fill only those items that match that list. a popup-form would also be nice there...

anyhow, did you already check what part takes the most time, the query, the looping or the filling? what are the timings, btw?

tip: hide the combo box controls while filling, that might help a bit.
0
 
emviruenaAuthor Commented:
In fact i am take some of the recomendations you are send me, at last, do you thing there is a way to clone the combobox and its items?  thanks.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>do you thing there is a way to clone the combobox and its items?
none that I am aware of...
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now