Sign in to follow this  

Question about listbox strings...

This topic is 4839 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
it is not a good idea to load 1600 items into a list box
to slow

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 4839 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this