Source language: Translate to:

Suggestions about listbox

Post your suggestions for future versions of NeoBook

Moderator: Neosoft Support

Suggestions about listbox

Postby sombra » Sun Mar 29, 2009 2:20 pm

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: http://www.neosoftware.com/forum/viewto ... 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.
I can read English, but... I write like Tarzan. (sorry)
sombra
 
Posts: 93
Joined: Sat Apr 02, 2005 3:09 pm
Location: Spain

Postby Gaev » Sun Mar 29, 2009 3:10 pm

sombra:

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.
User avatar
Gaev
 
Posts: 3737
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby dec » Sun Mar 29, 2009 4:12 pm

Hi,

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.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Postby Neosoft Support » Mon Mar 30, 2009 10:39 am

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.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBook Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests