In both desktop and server you could achieve this by choosing Bring Forward(), sendToBack(), etc.
But using these methods, if you want to rearrange 10 items in a specific way, you'll have to use some complex code to be able to put all items in the correct order.
In the data browser you can find the order in the index property, with 0 being the frontmost item.
What I'm looking for is a way to say:
myPageitem1.index = 0;
myPageitem2.index = 1;
and so on.
Unfortunately, the index property is read only, so this is not possible.
Is there anybody who did something similar, or can guide me in the right direction?
Would it work if you created a list of the page items in the order you wanted them, and then cycled through them using the sendToBack() method? This would leave the first item on top by the time you've processed all the page items in your list.
I'm trying to think of a way to randomly move a page item from one location in the stack to another, but I haven't thought of anything yet.