display or list

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

display or list

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:42 pm

by bitsnz >> Sun, 24 Oct 2004 22:20:54 GMT

Hello all.

I am currently using listCollection of which i can use this method to get what i need "listbox.listIndex := listBox.findObject( object to find);"

what i need is displayCollection due to the large amounts of data within the collection i have BUT i cant seem to use the method above to get what i need. i.e. "listbox.listIndex := listBox.findObject( object to find);" does not get the correct object within the list

Any reasons why?
Any ideas on how i can correct this or fix the problem?

Thankyou in advance

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: display or list

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:42 pm

by Patwos >> Mon, 25 Oct 2004 2:28:52 GMT

Your problem is most likely that findObject only looks at those objects that have already been loaded to populate the visible area of the list - plus perhaps a few more besides for optimisation reasons?

If the object you want to have selected is some way into the collection, such that it has not as yet been accessed by the displayCollection code, then it will not be found via findObject. If you know the object you require up front, then you can pass this as the startObj parameter to the displayCollection method.

Hope that helps,
Pat.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: display or list

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:42 pm

by bitsnz >> Mon, 25 Oct 2004 3:10:19 GMT

Cheers Patwos

Its what i believed was the problem, and the startObj perimeter was the logical answer (or somewhat of an answer). I'll continue with what i had in mind (and what you have suggested) until some other ideas are presented.

Once again, cheers for the reply Patwos.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 26 guests