Page 1 of 1

Suggestions about listbox

PostPosted: Sun Mar 29, 2009 2:20 pm
by sombra
This is only some ideas for improve the behaviour of listboxes.
Currently if you listbox have a huge of items it turns to slow operation.
  • For example in related to this post: ... 3#11194023
  • Until all items are not loaded in memory the listbox is not funcional.
  • When you try to add an item to a huge listbox: for example a simple loop for add 10 items to a listbox with 10.000 items with the command ListBoxAddItem.
  • etc.

The main idea would be load only in memory (on fly) a portion of the listbox instead of all items. (for example: double of items that are shown in listbox)
According the user does scroll the items could be loaded.

PostPosted: Sun Mar 29, 2009 3:10 pm
by Gaev

If you have 10,000 items ... processing them one at a time with script inside a Loop/EndLoop block is perhaps not a good idea.

Instead, you might try specifying a variable ... e.g. [myItems] ... in the List items: section of the ListBox ... then ...
Code: Select all
FileRead "[Embedded]TenThousandItems.dat" "All" "[myItems]"
... should be much faster.

PostPosted: Sun Mar 29, 2009 4:12 pm
by dec

Not only to much items, but, who can deal with 10.000 items? A better and elegant solution is using some specie of pagination. You can read a file with list items, for example, but read step by step, maybe 100 items at a time, and offer the posibility to the user to navigate around the 10.000 items, maybe the user can search into the whole items. In any case, deal with 10.000 items at all is a bad idea, in my opinion. Not only in Neobook and Neobook listbox, but in any case.

PostPosted: Mon Mar 30, 2009 10:39 am
by Neosoft Support
I agree, 10,000 items is too many for a list box. It would take forever for a user to find the item they are looking for.

Instead you might want to divide the items into categories. Place the categories into a list box and then when one is selected, display the items that fall under that category in another list box.

Another option would be to use a database.