Listbox gadget

BlitzMax Forums/MaxGUI Module/Listbox gadget

Moraldi(Posted 2007) [#1]
Does anyone knows how many items a listbox gadget can populate?
Thanks!


tonyg(Posted 2007) [#2]
It looks like the item index count is held in an int so 2147483647 could well be the limit.


Moraldi(Posted 2007) [#3]
thanks tonyg.


Brucey(Posted 2007) [#4]
Good luck with that though... I doubt you'll get much response from it if you go anywhere near that kind of figure :-)


Floyd(Posted 2007) [#5]
Yeah, you would want to break that up into two lists.


TaskMaster(Posted 2007) [#6]
Just use a listbox of listboxes, then you can store an infinite amount of items...


Moraldi(Posted 2007) [#7]
Suppose you have to access 1000 items from the hard disk.
Which is the right method to populate a listbox gadget?
Is it right to populate for once or partially while the user browses the listbox?


Kev(Posted 2007) [#8]
anyone found a way to speed up adding items to a listbox, it seems realy slow.

@TaskMaster, can you explain a little more?


SebHoll(Posted 2007) [#9]
anyone found a way to speed up adding items to a listbox, it seems realy slow.

You may want to have a look at SetDataSource() which is a BETA TGadget method implemented by Skidracer a while back. It supposedly provided a faster way to populate gadget items using arrays, but I have never used it.


TaskMaster(Posted 2007) [#10]

@TaskMaster, can you explain a little more?



Sorry, I was trying to be funny...

If you wanted to populate a listbox with the contents of a directory, I would do it all at once. If a user has a thousand or more items in a directory, they have no right to complain about it being slow to access it.


Kev(Posted 2007) [#11]
thanks SebHoll, much faster :)


dmaz(Posted 2007) [#12]
never mind.


Moraldi(Posted 2007) [#13]
Why a list box is only for reading directory entries?
Which gadget is suitable for reading entries from a data file?


TaskMaster(Posted 2007) [#14]
You can list anything you want in a listbox. It was just mentioned earlier in the thread about listing contents of a directory.


Kev(Posted 2007) [#15]

If you wanted to populate a listbox with the contents of a directory, I would do it all at once. If a user has a thousand or more items in a directory, they have no right to complain about it being slow to access it.



ok thats fair, however when you add lots of items to your listbox the visable affect of maxgui while populating the listbox does not look professional. i sorted this by using a cache and loading it when the app starts up, the cache is only updated when the server is refreshed.