Can one sort UI depth programatically?

I have started trying out uGUI in a prototype project and have come across a bit of a roadblock: Is there a way to sort UI elements within an overlay canvas at runtime (programatically)?

Alternatively I think I could use a dedicated UI camera, camera canvas and the z value to achieve sorting capabilities in an overlay, but I would prefer it if the overlay canvas could handle all of this.

The magic words in the documentation you're looking for are "sibling index" under the Transform class. Those functions are equivalent to dragging the transform order around in the hierarchy.

Thanks for the help, I found the documentation and I'm going to give it a try. I never would have stumbled upon sibling index on my own, much appreciated.