Bilbo_Baggins_Esq
Registered User.
- Local time
- Today, 12:12
- Joined
- Jul 5, 2007
- Messages
- 586
I have some code that successfully gathers some items and adds these items to a listbox, one item at a time using .AddItem
And it works ok.
The problem is, when there are a bunch of items to add, everytime the .AddItem runs, the form redraws.
I don't mind this terribly when there is only a few items.
but sometimes there are a bunch and this leads to a lot of flicking while the form redraws however many times .AddItem adds an item.
I've had the idea of building an array and then assigning the array to the listbox.
I can build the arrray no problem but i have not been able to assign the array to the listbox all at once.
All I can figure out how to do is add items to the listbox from the array one specific item ListArray(i) at a time.
Obviously this would work, but gains me nothing in terms of the visual effect in the form becuase it is still adding to the listbox one item at a time.
Is there some way to assign an array to a list box all at once, without doing it one item at a time?
And it works ok.
The problem is, when there are a bunch of items to add, everytime the .AddItem runs, the form redraws.
I don't mind this terribly when there is only a few items.
but sometimes there are a bunch and this leads to a lot of flicking while the form redraws however many times .AddItem adds an item.
I've had the idea of building an array and then assigning the array to the listbox.
I can build the arrray no problem but i have not been able to assign the array to the listbox all at once.
All I can figure out how to do is add items to the listbox from the array one specific item ListArray(i) at a time.
Obviously this would work, but gains me nothing in terms of the visual effect in the form becuase it is still adding to the listbox one item at a time.
Is there some way to assign an array to a list box all at once, without doing it one item at a time?