universengo Member May 16, 2019 #1 Hello everyone! I am a newbje, so I need your help as below: I use mebubar to make as below: File1 -> Open 1 File2 -> Open 2 ..... I use many forms: Main, Open1, Open2 The frist load MAIN layout Code: Sub AppStart (Form1 As Form, Args() As String) 'Load form MainForm = Form1 MainForm.RootPane.LoadLayout("Main") End Sub Then I choose menubar to load OPEN1 layout Then I choose menubar to load OPEN2 layout When I load form then the following loading form will overlap the previous loading form. I don't now how to remove these layout that is only current layout open. I used Code: MainForm.RootPane.RemoveAllNodes before load new layout BUT menu Action do nothing. Help me. Thanks.
Hello everyone! I am a newbje, so I need your help as below: I use mebubar to make as below: File1 -> Open 1 File2 -> Open 2 ..... I use many forms: Main, Open1, Open2 The frist load MAIN layout Code: Sub AppStart (Form1 As Form, Args() As String) 'Load form MainForm = Form1 MainForm.RootPane.LoadLayout("Main") End Sub Then I choose menubar to load OPEN1 layout Then I choose menubar to load OPEN2 layout When I load form then the following loading form will overlap the previous loading form. I don't now how to remove these layout that is only current layout open. I used Code: MainForm.RootPane.RemoveAllNodes before load new layout BUT menu Action do nothing. Help me. Thanks.
universengo Member May 16, 2019 #2 Error: In Open 1 and Open 2...layout, I almost have a CLOSE button with the code: Code: MainForm.RootPane.RemoveNodeFromParent MainForm.RootPane.LoadLayout("Main") the current layout will CLOSE but when I open new layout from menu will be DO NOTHING. SOLVED: I use menu CLOSE in Main layout and use code: Code: Sub CLOSE-MAIN_ACTION MainForm.RootPane.RemoveNodeFromParent MainForm.RootPane.LoadLayout("Main") End Sub these code of CLOSE buttons of layouts will change to: Code: CallSub("",Main.CLOSE-MAIN_Action) That is OK NOW. Upvote 0
Error: In Open 1 and Open 2...layout, I almost have a CLOSE button with the code: Code: MainForm.RootPane.RemoveNodeFromParent MainForm.RootPane.LoadLayout("Main") the current layout will CLOSE but when I open new layout from menu will be DO NOTHING. SOLVED: I use menu CLOSE in Main layout and use code: Code: Sub CLOSE-MAIN_ACTION MainForm.RootPane.RemoveNodeFromParent MainForm.RootPane.LoadLayout("Main") End Sub these code of CLOSE buttons of layouts will change to: Code: CallSub("",Main.CLOSE-MAIN_Action) That is OK NOW.