Didier9 Well-Known Member Licensed User Longtime User Dec 4, 2021 #1 A number of widgets have a BringToFront property, the Pane does not have one. I have added buttons on a form after I added the pane, and now the buttons are above the pane and showing up. I have not found a way to make them go back. I could make them invisible (and visible again when I remove the pane) but there must be a better way...
A number of widgets have a BringToFront property, the Pane does not have one. I have added buttons on a form after I added the pane, and now the buttons are above the pane and showing up. I have not found a way to make them go back. I could make them invisible (and visible again when I remove the pane) but there must be a better way...
EnriqueGonzalez Expert Licensed User Longtime User Dec 4, 2021 #2 The z index is managed by the designer. In the designer put the node you want in the back at the first position of the views tree If you are doing it by code then remove the view from its parent and add it again it should be now Infront Upvote 0
The z index is managed by the designer. In the designer put the node you want in the back at the first position of the views tree If you are doing it by code then remove the view from its parent and add it again it should be now Infront
Didier9 Well-Known Member Licensed User Longtime User Dec 4, 2021 #3 Enrique, my savior! Thank you so much, I did not know the Tree View actually shows the zOrder... It is actually convenient but I had completely missed it. Enjoy coffee on my account! Upvote 0
Enrique, my savior! Thank you so much, I did not know the Tree View actually shows the zOrder... It is actually convenient but I had completely missed it. Enjoy coffee on my account!
EnriqueGonzalez Expert Licensed User Longtime User Dec 4, 2021 #4 Didier9 said: Enjoy coffee on my account! Click to expand... I will thank you! Upvote 0
agraham Expert Licensed User Longtime User Jun 15, 2022 #5 I'm posting this here as a way to determine Z-order at runtime in B4J that I haven't seen in the forum. I had a similar problem and found that all Jafa FX nodes have a toFront and toBack method that can easily be invoked using a JavaObject. B4X: Copy Private cvs As Canvas Dim cvsjo As JavaObject ... cvs.Initialize("") pnlBackground.AddView(cvs, 0, 0, cvsSize, cvsSize) ... cvsjo = cvs cvsjo.RunMethod("toFront", Null) Upvote 0
I'm posting this here as a way to determine Z-order at runtime in B4J that I haven't seen in the forum. I had a similar problem and found that all Jafa FX nodes have a toFront and toBack method that can easily be invoked using a JavaObject. B4X: Copy Private cvs As Canvas Dim cvsjo As JavaObject ... cvs.Initialize("") pnlBackground.AddView(cvs, 0, 0, cvsSize, cvsSize) ... cvsjo = cvs cvsjo.RunMethod("toFront", Null)
Erel B4X founder Staff member Licensed User Longtime User Jun 15, 2022 #6 Code: Copy cvs.As(B4XView).BringToFront Tip: in most cases it is better to use B4XCanvas. Upvote 0