Page 1 of 1

display or list

Posted: Fri Aug 07, 2009 12:42 pm
by ConvertFromOldNGs
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

Re: display or list

Posted: Fri Aug 07, 2009 12:42 pm
by ConvertFromOldNGs
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.

Re: display or list

Posted: Fri Aug 07, 2009 12:42 pm
by ConvertFromOldNGs
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.