cancel
Showing results for 
Search instead for 
Did you mean: 

Change Object Z-Order

Artur Vieira
Associate III

Hi

Is there any way to change an object "z-order" via code?

Using the designer is easy, just click the button "Send backwards" and "Bring forward", this basically change in the "ViewBase.cpp" the order of adding the object to the screen.

Is there any way to do this after, for any object we add (in "setupScreen" function)?

Use Case: I have a page with some buttons to perform some actions, but would like that if the user press anywhere on the screen (that is not a button) to execute an action (change page), for that i am using a touchArea that i have to add manually, but since it is always the last object added it stays in front of other objects and captures the click for the buttons.

Thank You

1 ACCEPTED SOLUTION

Accepted Solutions
COSEBE
Senior

Hi,

Just call remove(windget_you_want_in_front) and add this widget again with add(windget_you_want_in_front)

Sébastien

View solution in original post

2 REPLIES 2
COSEBE
Senior

Hi,

Just call remove(windget_you_want_in_front) and add this widget again with add(windget_you_want_in_front)

Sébastien

Artur Vieira
Associate III

Hi

thanks for the tip... yeah, simple and it works.

Just need to remember if i add more objects in the designer to update the function to remove them and add them after the toucharea.

Thanks