A atiaust Active Member Licensed User Longtime User Aug 22, 2016 #1 Hi All, I have created a base layout as suggested by Erel with a large pane anchored to all sides. I load two vertical layouts one on the left and one on the right both occupying 1/2 the screen each. The left layout is pretty much static but the right layout is either blank or has a different layout depending on selections on the left. My questions are: 1) How do you remove the layout on the right to leave it blank or do you load a blank layout to replace it and how do you specify where to load on the right of the screen? 2) Does loading a layout replace the existing layout or does it load it on top? Hope this is some what clear. Thanks
Hi All, I have created a base layout as suggested by Erel with a large pane anchored to all sides. I load two vertical layouts one on the left and one on the right both occupying 1/2 the screen each. The left layout is pretty much static but the right layout is either blank or has a different layout depending on selections on the left. My questions are: 1) How do you remove the layout on the right to leave it blank or do you load a blank layout to replace it and how do you specify where to load on the right of the screen? 2) Does loading a layout replace the existing layout or does it load it on top? Hope this is some what clear. Thanks
Erel B4X founder Staff member Licensed User Longtime User Aug 22, 2016 #2 2) The views are added above the current views. 1) Put all the views in the "secondary" layouts inside a panel. This will allow you to remove the layout by calling Panel.RemoveFromParent. Upvote 0
2) The views are added above the current views. 1) Put all the views in the "secondary" layouts inside a panel. This will allow you to remove the layout by calling Panel.RemoveFromParent.
A atiaust Active Member Licensed User Longtime User Aug 23, 2016 #3 Erel, Should this be Panel.RemoveNodeFromParent? When I do this to remove a layout I can't load another layout in its place. Process I am using: (not full code just example) 1) Form.RootPane.LoadLayout("MainForm") 'Form with SplitPane 2) SplitPane.LoadLayout("LeftPane") 'has pane "pnlLeft" 3) SplitPane.LoadLayout("RightPane") 'has pane "pnlRight" 4)pnlLeft.LoadLayout("NewLyt") NewLyt has a Button 'btnClose' 5) Sub btnClose pnlLeft.RemoveNodeFromParent End Sub When I try to load NewLyt again nothing happens. What am I doing wrong? Thanks Upvote 0
Erel, Should this be Panel.RemoveNodeFromParent? When I do this to remove a layout I can't load another layout in its place. Process I am using: (not full code just example) 1) Form.RootPane.LoadLayout("MainForm") 'Form with SplitPane 2) SplitPane.LoadLayout("LeftPane") 'has pane "pnlLeft" 3) SplitPane.LoadLayout("RightPane") 'has pane "pnlRight" 4)pnlLeft.LoadLayout("NewLyt") NewLyt has a Button 'btnClose' 5) Sub btnClose pnlLeft.RemoveNodeFromParent End Sub When I try to load NewLyt again nothing happens. What am I doing wrong? Thanks
Erel B4X founder Staff member Licensed User Longtime User Aug 23, 2016 #4 atiaust said: Should this be Panel.RemoveNodeFromParent? Click to expand... Yes. atiaust said: What am I doing wrong? Click to expand... Please upload the full project (File - export as zip). Upvote 0
atiaust said: Should this be Panel.RemoveNodeFromParent? Click to expand... Yes. atiaust said: What am I doing wrong? Click to expand... Please upload the full project (File - export as zip).
A atiaust Active Member Licensed User Longtime User Aug 23, 2016 #5 Erel, Run the app and select 'About' from help menu. press the close button and try to open the 'About' again. Thanks Upvote 0
Erel, Run the app and select 'About' from help menu. press the close button and try to open the 'About' again. Thanks
Erel B4X founder Staff member Licensed User Longtime User Aug 23, 2016 #6 Once you called pnlRight.RemoveNodeFromParent then pnlRight is removed from the nodes tree. In your case you need to call pnlRight.RemoveAllNodes to clear it as you do want to keep the pane. Upvote 0
Once you called pnlRight.RemoveNodeFromParent then pnlRight is removed from the nodes tree. In your case you need to call pnlRight.RemoveAllNodes to clear it as you do want to keep the pane.
A atiaust Active Member Licensed User Longtime User Aug 23, 2016 #7 Thanks. I did think this may have been the case. Upvote 0