CheckListBox can ony load 65536 rows???

I am having a problem with the CheckedListBox class. It seems to load only 2^16 = 65536 items.

Actually, let me rephrase that. It can load all the items I want to. But, when it comes to handling the ItemIndex to do any kind of arithmetics, it would return the index (X - 65536).

So, if I try getting the index of the 65540'th item, it would return (65540 - 65536) = 4.

This means that instead of doing arithmetics with the 65540'th item, the application is working on the 4th item.

As far as I can understand, this is due to the ItemIndex being an integer datatype. That means it can only be 16-bits long and maximum value can be 2^16 = 65536.

Is this problem solvable  Or is there a way around it

Any help is appreciated........... Thanx


Answer this question

CheckListBox can ony load 65536 rows???

  • meeka29

    That is a good idea, bloke. And thanx for it.

    But, I use it in an analytical tool. In the tool, I am picking up raw data from a source and have to do enormous calculations on all the rows in the CheckListBox. After the calculations, the CheckListBox has columns which give me the result of those calculations.

    Therefore, I can't use ComboBox.

    So the original question still stands, "Can a CheckListBox object hold and handle more than 65536 rows ".......

    If yes, how .......... and if not, how can one work around it .........

  • jm_p

    I wouldn't want to be a user having to check and uncheck 65000 entries.  I'd put a combobox above it with values that the user can filter on and then show only the filtered selection.  With 65000+ entries you may need more than a combobox but the idea of filtering the Dataset is your (and your users) answer.  Plus who wants to drag all that data when the user may only want to change one value.
  • CheckListBox can ony load 65536 rows???