"Send to back" in scripting

Hi All,

I have a form that inherits some elements from its parent and I toggle their visibility when needed but I want them to always be in front of whatever other elements the child form has.
And I can’t seem to be able to do it :lol:
RIght-click → arrange → send to back/bring to front doesn’t seem to work at design time either.
Is this because the elements I want in front are on the parent form and I can never have them overlap the child form’s elements?

Cheers,
Maria

Wonder if this z-axis technique still works:

http://www.servoymagazine.com/home/2006/12/tip_manipulatin.html

maria:
Hi All,

I have a form that inherits some elements from its parent and I toggle their visibility when needed but I want them to always be in front of whatever other elements the child form has.
And I can’t seem to be able to do it :lol:
RIght-click → arrange → send to back/bring to front doesn’t seem to work at design time either.
Is this because the elements I want in front are on the parent form and I can never have them overlap the child form’s elements?

Cheers,
Maria

By default the child elements will be shown in front of the parent elements. In Servoy 6.0 we have property override, so the order can be modified as you like (but not possible in Servoy 5.x).

lvostinar:

maria:
Hi All,

I have a form that inherits some elements from its parent and I toggle their visibility when needed but I want them to always be in front of whatever other elements the child form has.
And I can’t seem to be able to do it :lol:
RIght-click → arrange → send to back/bring to front doesn’t seem to work at design time either.
Is this because the elements I want in front are on the parent form and I can never have them overlap the child form’s elements?

Cheers,
Maria

By default the child elements will be shown in front of the parent elements. In Servoy 6.0 we have property override, so the order can be modified as you like (but not possible in Servoy 5.x).

That’s cool. Thank you! :D

lvostinar:

maria:
Hi All,

I have a form that inherits some elements from its parent and I toggle their visibility when needed but I want them to always be in front of whatever other elements the child form has.
And I can’t seem to be able to do it :lol:
RIght-click → arrange → send to back/bring to front doesn’t seem to work at design time either.
Is this because the elements I want in front are on the parent form and I can never have them overlap the child form’s elements?

Cheers,
Maria

By default the child elements will be shown in front of the parent elements. In Servoy 6.0 we have property override, so the order can be modified as you like (but not possible in Servoy 5.x).

Laurian, which property would that be, please? I’m in Servoy 6 and cannot seem to find it.

Cheers,
Maria

maria:

lvostinar:

maria:
Hi All,

I have a form that inherits some elements from its parent and I toggle their visibility when needed but I want them to always be in front of whatever other elements the child form has.
And I can’t seem to be able to do it :lol:
RIght-click → arrange → send to back/bring to front doesn’t seem to work at design time either.
Is this because the elements I want in front are on the parent form and I can never have them overlap the child form’s elements?

Cheers,
Maria

By default the child elements will be shown in front of the parent elements. In Servoy 6.0 we have property override, so the order can be modified as you like (but not possible in Servoy 5.x).

Laurian, which property would that be, please? I’m in Servoy 6 and cannot seem to find it.

Cheers,
Maria

Property override is a mechanism that any property from inherited element (that comes from parent form) can be modified without modifying the parent element.

lvostinar:

maria:

lvostinar:
By default the child elements will be shown in front of the parent elements. In Servoy 6.0 we have property override, so the order can be modified as you like (but not possible in Servoy 5.x).

Laurian, which property would that be, please? I’m in Servoy 6 and cannot seem to find it.

Cheers,
Maria

Property override is a mechanism that any property from inherited element (that comes from parent form) can be modified without modifying the parent element.

Ok :)
But how do I use that mechanism? I’m sorry if I’m missing something very obvious but there’s no property to change or I cannot see it.
Would you give me a clue on where to look at? Thanks!

Cheers,
Maria

You can just edit an inherited element like you edit a normal one. Those changes will not be seen in parent element. In Servoy 5.x the inherited element was readonly. So, send to back/bring to front actions should just work , even for inherited elements. Are you saying you are on 6.0 and these actions don’t work ?

lvostinar:
You can just edit an inherited element like you edit a normal one. Those changes will not be seen in parent element. In Servoy 5.x the inherited element was readonly. So, send to back/bring to front actions should just work , even for inherited elements. Are you saying you are on 6.0 and these actions don’t work ?

Unfortunately, they don’t.
In the sample solution attached, I right-click the ‘red-form’ tabpanel and choose “arrange → send to back”, then save, start the client and the form does not go to background.
If I bring the green-form tabpanel to front nothing changes either; even the save button does not come forth in Developer to indicate something changed in the form design.

I’m using Servoy Version: 6.0.0 - build 1217, Java 1.6.0_24.

Cheers,
Maria

sendToBack.servoy (4.25 KB)

maria:

lvostinar:
You can just edit an inherited element like you edit a normal one. Those changes will not be seen in parent element. In Servoy 5.x the inherited element was readonly. So, send to back/bring to front actions should just work , even for inherited elements. Are you saying you are on 6.0 and these actions don’t work ?

Unfortunately, they don’t.
In the sample solution attached, I right-click the ‘red-form’ tabpanel and choose “arrange → send to back”, then save, start the client and the form does not go to background.
If I bring the green-form tabpanel to front nothing changes either; even the save button does not come forth in Developer to indicate something changed in the form design.

I’m using Servoy Version: 6.0.0 - build 1217, Java 1.6.0_24.

Cheers,
Maria

This will be fixed in Servoy 6.0.1 release.

lvostinar:

maria:

lvostinar:
You can just edit an inherited element like you edit a normal one. Those changes will not be seen in parent element. In Servoy 5.x the inherited element was readonly. So, send to back/bring to front actions should just work , even for inherited elements. Are you saying you are on 6.0 and these actions don’t work ?

Unfortunately, they don’t.
In the sample solution attached, I right-click the ‘red-form’ tabpanel and choose “arrange → send to back”, then save, start the client and the form does not go to background.
If I bring the green-form tabpanel to front nothing changes either; even the save button does not come forth in Developer to indicate something changed in the form design.

I’m using Servoy Version: 6.0.0 - build 1217, Java 1.6.0_24.

Cheers,
Maria

This will be fixed in Servoy 6.0.1 release.

Thanks, Laurian.

lvostinar:

maria:

lvostinar:
You can just edit an inherited element like you edit a normal one. Those changes will not be seen in parent element. In Servoy 5.x the inherited element was readonly. So, send to back/bring to front actions should just work , even for inherited elements. Are you saying you are on 6.0 and these actions don’t work ?

Unfortunately, they don’t.
In the sample solution attached, I right-click the ‘red-form’ tabpanel and choose “arrange → send to back”, then save, start the client and the form does not go to background.
If I bring the green-form tabpanel to front nothing changes either; even the save button does not come forth in Developer to indicate something changed in the form design.

I’m using Servoy Version: 6.0.0 - build 1217, Java 1.6.0_24.

Cheers,
Maria

This will be fixed in Servoy 6.0.1 release.

Laurian, I updated Servoy to 6.0.1 and it still doesn’t work. Sorry.

Cheers,
Maria

maria:

lvostinar:

maria:
Unfortunately, they don’t.
In the sample solution attached, I right-click the ‘red-form’ tabpanel and choose “arrange → send to back”, then save, start the client and the form does not go to background.
If I bring the green-form tabpanel to front nothing changes either; even the save button does not come forth in Developer to indicate something changed in the form design.

I’m using Servoy Version: 6.0.0 - build 1217, Java 1.6.0_24.

Cheers,
Maria

This will be fixed in Servoy 6.0.1 release.

Laurian, I updated Servoy to 6.0.1 and it still doesn’t work. Sorry.

Cheers,
Maria

I tried your sample in 6.0.1 and I can arrange the order as I want (works in both debug smart and web client). Are you sure is not working?

lvostinar:
I tried your sample in 6.0.1 and I can arrange the order as I want (works in both debug smart and web client). Are you sure is not working?

Laurian, the sample works fine for me too.
But I never show the design form (I tried to, now, and it worked perfectly well).
What I do is I clone it along with all the forms in its tabs, replace the ‘containsForm’ property with references to new clones (otherwise one and the same tab form cannot be shown in more than one window) and show it in a new window.

Please see the sample solution attached, I modified it to reproduce the problem.

Do you think it’s the order of cloning forms or replacing the ‘containsForm’ stuff? Or anything else I could change in my code?
I played around with it a little but could not figure it out just yet.

Cheers,
Maria

sendToBack.servoy (4.92 KB)

Um…?

maria:

lvostinar:
I tried your sample in 6.0.1 and I can arrange the order as I want (works in both debug smart and web client). Are you sure is not working?

Laurian, the sample works fine for me too.
But I never show the design form (I tried to, now, and it worked perfectly well).
What I do is I clone it along with all the forms in its tabs, replace the ‘containsForm’ property with references to new clones (otherwise one and the same tab form cannot be shown in more than one window) and show it in a new window.

Please see the sample solution attached, I modified it to reproduce the problem.

Do you think it’s the order of cloning forms or replacing the ‘containsForm’ stuff? Or anything else I could change in my code?
I played around with it a little but could not figure it out just yet.

Cheers,
Maria

Sorry, forgot about this one. Actually this is not a bug. The main form works as you want because you override/modify the zindex order. However when you clone, you create a different parallel structure, the parent form is different so all the overrides will be lost (we cannot know that is a clone of the initial form). You can check that form index will be 0 for both tabpanels. So, all you have to do is to assign the formindex again, add ```
solutionModel.getForm(“products_child_” + postFix).getTabPanel(“tabs_59”).formIndex = 1;

lvostinar:
Sorry, forgot about this one. Actually this is not a bug. The main form works as you want because you override/modify the zindex order. However when you clone, you create a different parallel structure, the parent form is different so all the overrides will be lost (we cannot know that is a clone of the initial form). You can check that form index will be 0 for both tabpanels. So, all you have to do is to assign the formindex again, add ```
solutionModel.getForm(“products_child_” + postFix).getTabPanel(“tabs_59”).formIndex = 1;

Yep, that worked :)
Thank you!