Mashiane Expert Licensed User Longtime User Aug 18, 2016 #1 Hi there How can I BringToFront a Pane in B4J with code?
Erel B4X founder Staff member Licensed User Longtime User Aug 18, 2016 #2 You can use this code: B4X: Sub BringToFront(n As Node) Dim parent As Pane = n.Parent n.RemoveNodeFromParent parent.AddNode(n, n.Left, n.Top, n.PrefWidth, n.PrefHeight) End Sub Upvote 0
You can use this code: B4X: Sub BringToFront(n As Node) Dim parent As Pane = n.Parent n.RemoveNodeFromParent parent.AddNode(n, n.Left, n.Top, n.PrefWidth, n.PrefHeight) End Sub
Mashiane Expert Licensed User Longtime User Aug 18, 2016 #3 Erel said: You can use this code: B4X: Sub BringToFront(n As Node) Dim parent As Pane = n.Parent n.RemoveNodeFromParent parent.AddNode(n, n.Left, n.Top, n.PrefWidth, n.PrefHeight) End Sub Click to expand... Good shot, thanks Upvote 0
Erel said: You can use this code: B4X: Sub BringToFront(n As Node) Dim parent As Pane = n.Parent n.RemoveNodeFromParent parent.AddNode(n, n.Left, n.Top, n.PrefWidth, n.PrefHeight) End Sub Click to expand... Good shot, thanks
jmon Well-Known Member Licensed User Longtime User Aug 20, 2016 #4 I think this should work too (Requires Javaobject): B4X: Sub ToFront(n As Node) Dim joNode As JavaObject = n joNode.RunMethod("toFront", null) End Sub Source: https://docs.oracle.com/javase/8/javafx/api/javafx/scene/Node.html#toFront-- Upvote 0
I think this should work too (Requires Javaobject): B4X: Sub ToFront(n As Node) Dim joNode As JavaObject = n joNode.RunMethod("toFront", null) End Sub Source: https://docs.oracle.com/javase/8/javafx/api/javafx/scene/Node.html#toFront--