z-order

always on top

Is it possible to change the z-order of an object with script? I want to do this, object.z-order = always on top. If it's possible, can someone please post the correct syntax. I've searched and cannot find it. Maybe I'm overlooking it.

Thanks.

5,092 views 5 replies
Reply #1 Top
It would be great, but that property is not exposed at this point.
Reply #2 Top
Thanks MountainDragon. Maybe it will be added in an future upgrade.
Reply #3 Top
It does seem that very little can be done about changing the Z-Order via script.

In my case I am trying to export an object as a widget, and it just won't retain the "Always On Top" that I define in the object properties Relation pane. Even if it is set to "Always On Top" there, the widget defaults to "Normal" on first load. You can go into the widget's properties panel and change it there, though, and it will retain that setting until cache is cleared, as far as I can tell. Either exported widgets should inherit the property set when creating them, or there should be better control via script.

But! If you are not having this problem, and just want to bring the object to the top (rather than set Z-Order to "Always On Top") there is a way.

Just use: Object.OnTop

Maybe someone already said this. I can only see one of the supposed two comments.
Reply #4 Top
Thanks RabidRobot. I know what you mean about the default being set to "Normal" on first load. It would be nice if it did not override what we set it to in the properties "Relation" tab.
Reply #5 Top
I wish the z-order would be retained when you export to a widget...