Sort scrollview

dctechonline

Member
Licensed User
Longtime User
Is it possible to sort a scroll view by the content in one of its sub items?

I am retrieving data from a website to populate a scrollview with an image and 4 text fields. I would like the user to be able to click on a sort button and reorder the items in the scrollview alphabetically.

Is it possible to do or do i need to pull the data into an array, sort the array then pass it back into the scroll view?

Is there a way to set a scrollview with subitems to a collection?

In vb.net for WP7 i would create a collection to hold the data, sort the collection and then set the datasource of a listbox to that collection.

Is that possible with B4A?
 

mc73

Well-Known Member
Licensed User
Longtime User
A scrollview can hold different type of objects, thus in general, what would be the meaning of sorting? I think you can use a list, sort it, and then reconstruct your scrollview with the sorted contents, the way you've already described.
 
Upvote 0

dctechonline

Member
Licensed User
Longtime User
I was looking for an easier way, right now i am actually parsing the result from the web page, spliting it into fields and adding it to the scrollview while its parsed. I am not actually adding it to an array first. i was hoping to skip a step.
 
Upvote 0
Top