since you are referring to your container control “group” as an array, I assume you are using an older version of RealStudio and not Xojo. Control “arrays” were never really arrays at all and in Xojo they are referred to as “sets”. That is why you are not finding the array methods you are expecting. What are you trying to accomplish by changing the index of your arrays? Maybe there is a better way.
i am using the latest version.
i have a pagepanel in which i have embedded my containercontrol, i have added them to the array/set so i can easily access them.
and they keep the same index in the array/set as they do on the pagepanel.value so it is easy.
pagepanel.value=2 is the same as mycontrols(2)
no i have added a feature to rearange the pagepanel, so say number 4 becomes number 2 and pushes the ones after 2 up one.
with that done i now need to rearrange the array/set
since it IS a real array you can use sort with
the question is more what should the key values be to do the sorting
How does ht user designate that they want to move page 4 to page 2 (for instance) ?
It might be best to simple swap the items in your array that is the containers right then
i tried using sortwith but it is not available, the swapping of the pagepanel panels has been coded already and working fine.
i can’t remove and re add the items to the control array as that will lose there link the the actual containercontrol embbeded within the pagepanels.
i am a twat.
i had it the wrong way around. integerarray.sortwith mycontainers does work.
i am use to another language where the array to be sorted is first.
i feel so stupid. thanks for helping me see the light guys.
on another note. anyone know why i can use .tabpanelindex on a contrainercontrol embedded within a pagepanel to change the page it is on and it works fine but there is no .panelindex to be able to change it?