Question about listbox strings...

Started by
5 comments, last by FenixRoA 19 years, 7 months ago
I need a listbox to hold about 1600 objects (or string variables). My other option is to only load up one of the alphabet each time I request data. How much memory (approx) will this take up? will I be able to hold 1600 string objects in a listbox with 512 Mb RAM without cutting into my pagefile (consider I already use about 185 mb just to idle my operating system (windows XP SP2) and this is in a normal windows form with ABSOLUTELY no other object loaded). I am using Visual Studio .NET 2002 C#. Thanks for your time and consideration, FenixRoA
Advertisement
it is not a good idea to load 1600 items into a list box
to slow
Redesing your UI (and probably your entire application), because no user can deal with 1600 options in a list box.
look at LBS_NODATA -- it's recommended for list boxes with >1000 items.

another option (if it applies to your data) is to filter the data to keep it closer to ~300-400 items and allow the user to select the filter first.
the listbox contains the name of every person in a certain organization.

The program will provide information and the means to change the information if proper security clearance is granted.

They will not be any form of options. Just considering different methods to scroll through the names.

I've decided that the user will select a letter of the alphabet and all members starting with that letter will be loaded.

My guess is on average I'll have about 60-80 people loaded into the listbox at a time.

This is reasonable or should I further seperate my list?
60-80 items is fine for a list box. Another option is to have an edit box where everytime a character is entered it loads the names matching the start of what was entered.

i.e. entering 'j' would display everyone starting w/a 'j'. entering 'e' would show only je* names. that way you're not forcing people to poke through a big list if they know they're looking for 'jeff' someone.
k, I got my system figured out... thanks for your help people

This topic is closed to new replies.

Advertisement