|
-
May 18th, 2005, 11:27 PM
#1
Thread Starter
Lively Member
Can listbox have a different data type? Integer 32767 is not enough.
hi, i am doing a loop that will stores all the combinations into a listbox, however, it has more than 32767 items, what should i do?
i did thought of using array, but i need it to be displayed and also need the index of the listbox for some calculations.
anyway i can change the listbox's .listcount maximum into 999999 ?
-
May 18th, 2005, 11:29 PM
#2
Re: Can listbox have a different data type? Integer 32767 is not enough.
Try using a ListView instead.
-
May 19th, 2005, 01:23 AM
#3
Re: Can listbox have a different data type? Integer 32767 is not enough.
I suggest u use an array to manage the items and use the list box as a secondary element for visual puproses only. So u can fill the array upto 999999 but display only 5 - 10 elements in the listbox. Add a scroll bar and on change, refresh teh list items from the array. So that the scrollbar, the listbox and the array stay in sync.
This was because even if u get a control which supports those much rows, I suppose it would be quite slow.
-
May 19th, 2005, 03:28 AM
#4
Thread Starter
Lively Member
Re: Can listbox have a different data type? Integer 32767 is not enough.
hmm... i know what u mean. but not quite sure its a good way, because of my calculations on producing the integer values that is going to ba a lot of them. the array doesnt seem to fit in so simple.
-
May 19th, 2005, 03:42 AM
#5
Re: Can listbox have a different data type? Integer 32767 is not enough.
Long and Double (and possibly Currency) Types can hold more than an Integer, although Pradeep's method isn't the best. Using an array it would take a very long time ( if not crash your PC ) to store all of the indexes in memory, let alone fill them with data.
You can't, lower your number of items?
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
-
May 19th, 2005, 03:49 AM
#6
Thread Starter
Lively Member
Re: Can listbox have a different data type? Integer 32767 is not enough.
 Originally Posted by chemicalNova
Long and Double (and possibly Currency) Types can hold more than an Integer, although Pradeep's method isn't the best. Using an array it would take a very long time ( if not crash your PC  ) to store all of the indexes in memory, let alone fill them with data.
You can't, lower your number of items?
chem
i sure hope i can lower the numbers of items.
however those are actually a combinations of various hex values from 1 digit to 4 digit from 0 -> FFFF.
i generated the list and its mroe than 32767, and so my listbox dont hold the index, and i am doign a loop to make it load the list item by index value into textbox.
anyway, i am spliting it up into 4 listbox. that should do the job.
Last edited by zerodevice; May 19th, 2005 at 04:00 AM.
-
May 19th, 2005, 03:59 AM
#7
Re: Can listbox have a different data type? Integer 32767 is not enough.
There is not much difference in storing data in array or listbox apart from the visual effect. Both can be accessed via their index values. u just need to keep them in sync.
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
|
Click Here to Expand Forum to Full Width
|