Hi to everyone,
i'm trying to insert TabPage inside tabPage with recursive method.
Everything to create different levels of tabPage inside another.
Code is:
But at last call of the function i receive an error:
i'm trying to insert TabPage inside tabPage with recursive method.
Everything to create different levels of tabPage inside another.
Code is:
B4X:
Sub b(tabPage As TabPage) As Pane
Dim pane As Pane
pane.Initialize("")
Dim tabPane As TabPane
tabPane.Initialize("")
pane.AddNode(tabPane,0,0,600,600)
tabPane.Tabs.Add(tabPage)
tabPage.Text = "lv"&increment
If increment < lv Then
increment = increment + 1
Dim t As TabPage
t.Initialize
tabPage.Content = b(t)
End If
Return pane
End Sub
But at last call of the function i receive an error:
B4X:
Waiting for debugger to connect...
Program started.
java.lang.IllegalArgumentException: Children: cycle detected: parent = TabPane@471bf3b9[styleClass=tab-pane], node = TabPaneSkin$TabContentRegion@43c41713[styleClass=tab-content-area]
at javafx.scene.Parent$2.onProposedChange(Parent.java:445)
at com.sun.javafx.collections.VetoableListDecorator.add(VetoableListDecorator.java:317)
at com.sun.javafx.scene.control.skin.TabPaneSkin.addTabContent(TabPaneSkin.java:428)
at com.sun.javafx.scene.control.skin.TabPaneSkin.<init>(TabPaneSkin.java:191)
at javafx.scene.control.TabPane.createDefaultSkin(TabPane.java:517)
at javafx.scene.control.Control.impl_processCSS(Control.java:872)
at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
at javafx.scene.control.Control.impl_processCSS(Control.java:868)
at javafx.scene.Node.processCSS(Node.java:9058)
at javafx.scene.Node.processCSS(Node.java:9051)
at javafx.scene.Scene.doCSSPass(Scene.java:545)
at javafx.scene.Scene.access$3600(Scene.java:159)
at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2392)
at com.sun.javafx.tk.Toolkit.lambda$runPulse$30(Toolkit.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:354)
at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:381)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:510)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:490)
at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$404(QuantumToolkit.java:319)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)