Gianni M Well-Known Member Licensed User Longtime User Sep 19, 2019 #1 project with 2 layout; how to manage objects into layout1 and layout2 ? Attachments splitPane_demo.zip splitPane_demo.zip 119.7 KB · Views: 361
Erel B4X founder Staff member Licensed User Longtime User Sep 19, 2019 #2 Events are always handled in the module that loaded the layout. You can pass the SplitPane to another module and load the layout there. You will not need to do anything special to work with the events and views from the other module. Upvote 0
Events are always handled in the module that loaded the layout. You can pass the SplitPane to another module and load the layout there. You will not need to do anything special to work with the events and views from the other module.
Gianni M Well-Known Member Licensed User Longtime User Sep 19, 2019 #3 Hi Erel, I do not understand. can you post an example code ? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Sep 20, 2019 #4 Manage2 code: Code: Sub Process_Globals Private fx As JFX End Sub Public Sub Show (parent As B4XView) parent.RemoveAllViews parent.LoadLayout("Layout1") End Sub Sub bt1LYT1_Click Log("click") End Sub Main code: Code: Sub ListMenu_SelectedIndexChanged(Index As Int) Select Index Case 0 Manage1.Show(pn) Case 1 Manage2.Show(pn) End Select End Sub Upvote 0
Manage2 code: Code: Sub Process_Globals Private fx As JFX End Sub Public Sub Show (parent As B4XView) parent.RemoveAllViews parent.LoadLayout("Layout1") End Sub Sub bt1LYT1_Click Log("click") End Sub Main code: Code: Sub ListMenu_SelectedIndexChanged(Index As Int) Select Index Case 0 Manage1.Show(pn) Case 1 Manage2.Show(pn) End Select End Sub
Gianni M Well-Known Member Licensed User Longtime User Sep 20, 2019 #5 yes! perfetc! Ta! new demo Attachments perfect.zip perfect.zip 120 KB · Views: 371 Upvote 0